Re: Saving data after each action



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 :)
 
Give your apps some time to exit in peace :-) SIGTERM and then wait a bit?

I modified my logoff script, i does send SIGTERM to kupfer now, so losing of data is purely hypothetical now ;-)
 
> I am now using Anamnesis for clipboard history [1]. It would be nice to have
> that functionality in Kupfer.

We'll have to patch the clipboard plugin in kupfer to use the config
mechanism for its data. Then it'll be saved periodically too. What
other cool features does that thing have?

Well, Anamnesis is different from any other clipboard manager I've seen so far in that it saves *every* clipboard entry I'v ever made, in a sqlite database and offers fast fulltext search. Simple as that. I actually thought about writing a plugin based on anamnesis, but you know the usual arguments about not having time, not really into python and kupfer plugins etc hindered me so far :( Also, I dont think this approach would be suitable for Kupfer, as we are talking about large amount of data eventually. But on the other hand this could happen to Kupfer as well, just copy several hundred megabites to the clipboard.



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