I can tell that I am going to need to run rebuild. Were this integrated into drush, I could run a rebuild off of atd in the wee hours of the AM.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 511956-xmlsitemap-drush-rebuild-D6.patch | 3.85 KB | dave reid |
| #7 | xmlsitemap-n511956-2.patch | 7.31 KB | damienmckenna |
| #5 | xmlsitemap-n511956.patch | 1.74 KB | damienmckenna |
Comments
Comment #1
dave reidThat would be a good idea. This could probably be a part of #481136: Create PCNTL-compatible generate-sitemaps.sh script but I'd need to investigate. For now, marking as postponed.
Comment #2
dave reidAdd basic Drush integration just for regenerating the sitemap files from the current data (what normally runs on cron).
Comment #3
dave reidBleh, so the rebuild that was carefully and painfully worked into a batch process so that it wouldn't break things is a little harder to run from Drush. I'd rather not write the whole thing again not as a batch process just for Drush and I can't find anything on how to convert/run a batch process within Drush. Anyone have any ideas or know-how?
Comment #4
damienmckennaCould it just:
?
Comment #5
damienmckennaHere's an example patch that does what I suggested in #4.
Comment #6
damienmckennaI wish there was a simple way to set higher limits on the hook_cron() functions if they're running via drush? Maybe add an optional argument to the functions to control the limit?
Comment #7
damienmckennaHere's a patch that extends the hook_cron() functions to allow an optional argument to override the limit being used. It then also adds a command-line option to control this limit - if a --limit value is given that is used otherwise it sets no limit.
Comment #8
moshe weitzman commentedDon't know if folks will run into memory problems, but we have recently solved those in migrate module's drush integration by using drush_backend_invoke(). Thats a possible improvement after you get basic drush integration working.
Comment #9
dave reidOoohhhh.... it actually looks like I might be able to use batch API with $batch['progressive'] = FALSE. Looks like all the code is there to make a complete batch run in one pass.
Comment #10
dave reidOk here's what I've got so far. We can technically run batch api in a non-redirect-browser way that works with command line, expect there's a minor bug with #638712: Make non-progressive batch operations possible. The batch processing runs but there's something funky with file permissions or not getting the right folder to write files to.
Comment #11
dave reidHeh, it was my own damn file permissions. You'll have to be careful since the files/xmlsitemap folder may be owned by your webserver user and your drush user doesn't have write permissions to the same directory.
Comment #12
dave reidCommitted to CVS! Thanks everyone!
Comment #13
damienmckennaSo does it work without the patch from #638712 applied?
Comment #14
dave reidYes it does. Luckily there's a quick workaround for it.