Influxdb persistence exclusion

Dear all,

I have a persistence file with the following code:

Strategies {
    everyMinute : "0 * * * * ?"
    everyHour   : "0 0 * * * ?"
    everyDay    : "0 0 0 * * ?"
}

Items {
* : strategy = everyChange, everyMinute, restoreOnStartup
}

i need to apply a different strategy only for few items and i want to overryde * strategy only for this few items,
whats’up if i make a new strategi with tis code?

Items {
nomeitem : strategy = everyDay
}

the first one with wildcard will be apply also for the item “nomeitem” ???

it’s possible to insert exception in a strategy?

No, individual lines in the .persist file do not interact with each other. There is no way to say “all Items but these.” You can say all Items with the *, or all members of this Group with GroupName*, or you have to specify each and every Item individually. See Design Pattern: Group Based Persistence for one way to achieve this.

2 Likes

It would work perfectly, if there would be a strategy like “DoNotPersist”.

This would allow to have a default strategy of “OneEveryChange”, but define a group which would have a strategy of “DoNotPersist”. so only this group would not be persisted.

or maybe there is such strategy?

PS. I created a strategy “doNotPersist” and defined it as “0 0 0 1 1 1”. it is not as good as no persistence at all, but basically it will practically persist smth once in several years.