Posted by indytechcook on November 23, 2009 at 1:46pm
5 followers
| Project: | Job queue |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Issue Summary
I had the need to limit the number of jobs run not only by time but also number so I didn't reach a threshold on an external API. I was making 1000's of calls to the API a minute when my limit was 200 every 10 minutes and getting locked out for an hour.
Here is a patch to add this functionality. It adds a configuration to the admin screen. It also fixes a php warning when submitting the settings form without any function priority settings.
Cheers,
Neil
| Attachment | Size |
|---|---|
| job_queue-count.patch | 3.28 KB |
Comments
#1
I was thinking the same thing. My server has a limit on the number of emails sent per hour, so I wanted to use job_queue to stop Drupal from sending out more than that. Emails are the primary thing I use queueing for.
Could have saved myself some time if I had bothered to search here first.
Anyway, since I already made the patch, I'll just put it up here for what it's worth. It does not fix the php warning like Neil's does. It's for version 6.x-3.1.
#2
+1 - Great feature addition! We are also using this module to send bulk email in batches using "queue mail" (to keep from triggering smtp quotas). I applied indytechcook's patch and it worked like a charm with 6.19
#4
Both patches has been successfully tested against 6.x-3.x-dev.
Personally I prefer to use the simple one :) Thank you both.
#5
+1