Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature request: deferred / buffered saves #432
[Given:] there are two variables that control what time of day (and what part of the hour) daily saves occur.
[Proposal:] a variable to restrict saves (userfile & chanfile) to once a day for systems running on flash memory (such as on nano boards, like the Banana Pi and Raspberry Pi), where the number of saves is rather finite before memory failure. The request is: when a certain config variable is set, BUFFER or POSTPONE saves until the triggered time.
New functions: tcl-commands.doc
All of the above options should also affect the writing of log files.
Of course, it would be smart for script coders to add a pre-die event to save if the bot is being shut-down. (As documented, this would not help during a KILL -9 or SEGV).
Appropriate caveats would need to be listed so users would know the risks of data not being saved [updated] regularly (i.e. newly added users, deleted users, changed user flags).
Triggeres to track when saves are needed: adduser / addbot, / remuser, chattr, setuser, dccsend (because it affects a user's FSTAT value); chanset / channel set
I realize that this setup will increase Eggdrop's memory footprint for logfiles; for SAVE/SAVECHANNEL/BACKUP, no additional memory would be used (other than boolean values to indicate which type of save is being "blocked" until the proper time).