Re: Saving data after each action



2011/3/3 SanskritFritz <sanskritfritz gmail com>:
> 2011/3/2 Ulrik Sverdrup <ulrik sverdrup gmail com>
>>
>> I have submitted changes to periodically save the user data (Source
>> "config" in Kupfer object terms) periodically (every hour). It only
>> affects the Triggers and Favorites plugins at the moment.
>
> Thanks. Two questions:
> 1. why one hour?
> 2. what speaks against my proposal of saving data when it was changed and
> needs to be saved? I mean, I create a new trigger or favorite an action, and
> Kupfer should immediately save it, simple and straightforward.
>
> As we are speaking about security measurements, a crash can occur any time
> (especially in archlinux which is pretty cutting edge), so even with this
> periodic saving, data could be lost when I'm still within the one hour
> frame. I'm not saying it is fatal (I probably can redo everything again),
> I'm just striving for the perfect solution :)

Saving "directly" would be better IMO, but then we need some
notification mechanism upwards from the plugins into Kupfer that data
has changed. That would be much superior to saving everything all the
time. 1 hour is just the period of the rescan cycle, so the save cycle
matches that.

Ulrik


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]