It would be helpful for a job to have access to store its current state (and possibly a status or error message) for jobs that run in pieces -- i.e. a batch node import reading data from a CSV file might only be able to import 50 nodes per cron run, so it would want to store its current position in the file to the job queue so on the next cron pass it can continue its work.
I'm willing to write a patch for this if you're interested in adding the feature to the module. I'd almost think just a serialized array would do the trick here; probably best to store it in a second table though to keep the existing job queue table fast and small. The alternative to having job_queue handle this is for each separate module that uses job_queue to store its own state data itself, but that seems like wasted effort (and duplicated code) if multiple modules end up using the feature).
Comments
Comment #1
doc2@drupalfr.org commentedPlease consider #330027: Adding views support - implementation suggestions. and help testing, eventually! Thanks in advance ;)
Arsène
Comment #2
drummThe queue is for queuing only, I actually recommend implementing what is best for your workload on your own, since every workload is different.