mosquito icon indicating copy to clipboard operation
mosquito copied to clipboard

Expiring jobs

Open greenbigfrog opened this issue 4 years ago • 3 comments

Thanks for all the work that's gone into this. One feature I'd like to see added would be expiring jobs. If a job can't/isn't processed within/until X, it won't run. Example: if I add a job to the queue, I only want it to run within the next 30 seconds. If the worker is not running or doesn't process the job within 30 seconds, it shouldn't work the job.

I'll look into implementing this myself sometime the next week.

greenbigfrog avatar Feb 12 '20 13:02 greenbigfrog

@greenbigfrog thanks for looking and jumping in!

This idea fits into a broad category of a pre and post-exec hooks I've been eyeing adding. 🌵 Eventually, I'd like to move the throttling code into a pre-exec hook as well, which can be included into a Job class as needed.

robacarp avatar Feb 12 '20 20:02 robacarp

Have you started work on the hook stuff yet somewhere?

On Wed, Feb 12, 2020, 21:59 robacarp [email protected] wrote:

@greenbigfrog https://github.com/greenbigfrog thanks for looking and jumping in!

This idea fits into a broad category of a pre and post-exec hooks I've been eyeing adding. 🌵 Eventually, I'd like to move the throttling code https://github.com/robacarp/mosquito/blob/master/src/mosquito/job.cr#L96-L111 into a pre-exec hook as well, which can be included into a Job class as needed.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/robacarp/mosquito/issues/41?email_source=notifications&email_token=ABPL27T7KUTCGQJQUM73OLDRCRPKBA5CNFSM4KTZRPV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELSLQBY#issuecomment-585414663, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPL27W4JOPCXYBAABV3SZ3RCRPKBANCNFSM4KTZRPVQ .

greenbigfrog avatar Feb 12 '20 21:02 greenbigfrog

Sorry, no

robacarp avatar Feb 13 '20 00:02 robacarp