From the get go, it was clear that the job scheduler in Feeds could be generalized and broken out of the module. The issues
#867910: Override schedule period
#721428: Make scheduler next scheduled time based
Have highlighted some of the conceptual problems in the current native scheduler that badly need cleanup:
- Very complex relationship between FeedsImporter, FeedsSource and FeedsScheduler.
- No way of 'slowing' or 'pausing' a single source.
- No way of rebuilding the schedule from scratch.
I've been working on cleaning up the internal scheduler API and wound up with a separate module "Job Scheduler", ready to be released independently of Feeds, Feeds would be relying on it.
It solves or the aforementioned problems or prepares the ground for their solution and vastly simplifies scheduling tasks.
Patch coming.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 908964-3_job_scheduler.patch | 56.52 KB | alex_b |
| #2 | 908964-2_job_scheduler.patch | 47.93 KB | alex_b |
| #1 | 908964-1_job_scheduler.patch | 47.9 KB | alex_b |
Comments
Comment #1
alex_b commentedAll tests passing.
Todo: test Drupal Queue integration.
This patch makes Feeds depend on:
http://drupal.org/project/job_scheduler
Note: includes/FeedsScheduler.inc is obsolete with this patch, the patch however does not remove it.
Comment #2
alex_b commentedAdjust to latest commit in job scheduler. Test working again.
Comment #3
alex_b commentedFix upgrade path. Turns out that blindly executing module_enable() or drupal_install_modules() on a module that may not be available can set the system table's status bit to one while the module is actually not installed. A subsequent installation would fail as the module's schema does not get installed.
Here is the fix. It checks whether a module is actually available in Drupal's search path and only then installs it.
Comment #4
alex_b commentedThis is committed now.
Note that Feeds now depends on Job Scheduler.
http://drupal.org/cvs?commit=422432
Comment #5
andrewlevine commentedGreat job on putting together this release. I tested the upgrade in the two scenarios you wanted me to and they seemed pretty well thought out and straight forward. I filed a couple bugs for the small issues I did come across.
I am a little bit worried about the changes with Job scheduler breaking my application just because so much code was shifted around and I have so much code waiting to be slightly broken. I imagine those will be bugs I just have to catch one by one.
Thanks for all your work on Feeds.
Comment #6
alex_b commentedDon't hesitate to hit me up on IRC.
Thanks so much for this review!