Posted by NaX on September 23, 2007 at 3:16pm
| Project: | Database Administration |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Jeremy |
| Status: | closed (fixed) |
Issue Summary
I have a backup set to run once a day and a cron that runs every hour. Every day my backup runs one cron run later each day. I found that the time the backup takes to run needs to be accounted for. So instead of setting the last run var at the end I set it with the start time, that way there is no delay and backups will run when expected each day.
I also moved the point the last run var is set. It is currently inside a if statement. I don’t think it should be conditionally set.
| Attachment | Size |
|---|---|
| time_delay.patch | 1.02 KB |
Comments
#1
Yeah, good catch. However, I'm not a fan of moving the variable_set() out of dba_auto_backup() and putting it directly in dba_cron(). What if someone invokes dba_auto_backup() some other way besides cron? I'd rather pass in a $start_time value as an argument to dba_auto_backup(), and then use that to set the variable when dba_auto_backup() is done (or, just call time() again inside dba_auto_backup() -- time() should be exceedingly fast).
Thanks,
-Derek
#2
I agree, how about this?
#3
Works for me. Should apply cleanly to both DRUPAL-4-7 and HEAD, so please commit in both branches. Thanks. ;)
#4
This is the other reason I'm less eager to commit patches, since you're the CVS expert and all. I generally commit changes to just the DRUPAL-4-7 and DRUPAL-5 branches, completely ignoring HEAD (being primarily lazy). You seem to be suggesting I commit to DRUPAL-4-7 and HEAD, ignoring the DRUPAL-5 branch?
#5
There is no DRUPAL-5 branch yet. ;) HEAD is where the current 5.x support is happening. That's why we're committing to DRUPAL-4-7 and HEAD these days.
#6
Why then does the 5.x-1.x-dev version show up on this page?
#7
Because if you click on the release node for 5.x-1.x-dev, http://drupal.org/node/94927, you'll see that it knows it's being rebuilt nightly from CVS HEAD:
Nightly development snapshot from CVS branch: HEAD
In the old system, the only way to get something called "5.0.tar.gz" (or equivalent) was to add a DRUPAL-5 branch. Now, it's based on the release nodes, and you can define a release node pointing to HEAD where you tell the system what version that code belongs to.
http://drupal.org/node/89699 might be helpful in understanding all this functionality and where it's going...
Of course, there's always the CVS handbook about exactly this topic:
http://drupal.org/node/17570#HEAD
#8
Hey, it's all making sense! Thanks. I had to read a little to figure out to use the -A flag for head, then everything worked great.
I committed the patch to 4.7-dev and HEAD.
#9
Cool, glad it's all making sense now.
Side note: I know it's your module, but would you mind using more descriptive CVS messages than just "Sync"? ;) You're not just syncing, you're applying the same fix from 4.7.x to our 5.x version of the module... Thanks. ;)
#10
Sorry, my original messages were more descriptive, but when I ran into problems I got measurably less verbose. I didn't expect that final commit to work, hence the single syllable commit message. My bad, and I stand appropriately reprimanded.
(By the way -- you've given this module much more recent love than I have, so I really don't consider it "mine" versus "yours" anymore. I see it as a collaboration these days, and I greatly value your contributions to it.)
#11
Thanks. ;) Although, that's only accurate if by "recent" you mean "6 months ago". I haven't done anything with this module for ages (until today). It languishes low on my priority list, unfortunately -- I've got way too many irons in the fire...
Anyway, it feels nice to have you back, active in the queue again, and making some much-needed progress. We'll get this fully ported to 5.x just in time for the 6.x release, it seems... ;)
p.s. This issue must win a record for highest ratio of meta-discussion to the size of the patch of any on d.o. ;)
#12
That's more recent than I've managed to get my hands dirty in the code... If not for all your effort, I'd probably be thinking of dropping the module altogether. It's unfortunately very low on my list, too, and obviously has been for far too long. But I'm forcing myself to devote a little time each week on my old projects, trying to keep them from getting buried in dust.
I'd very much like to get a 5.x release out sooner than later, as that's the version I now need. I'm less interested in the 4.7.x release anymore, honestly, though appreciate your sticking to continuing to support it.
#13