jeudi 17 décembre 2015

What's the best way to manage Resque jobs on per user basis?

I'm migrating from Delayed_jobs to Resque and I have difficulties finding the best way to handle those cases:

  1. A user can NOT add twice the same command to the list of jobs (e.g. "export all my data"). Only one export command at a time. For other it's fine to have many (e.g. send emails)

  2. Some jobs should not run for more than 5 minutes, while other are allowed to run for 30 minutes. In both cases, I'd like to have a time-out in case process is blocked or is not completed on time.

  3. Can add jobs to start in a few days

  4. Inform the user on all their current & future jobs.

  5. Can cancel some jobs (current and future) for the user

  6. Keep ability to have different lists (mostly for priorities / slow and fast tasks)

I looked at resque-status and it seems like it provides the low level query, but I would still need to do my per user job management.

Suggestions on best way to handle this?

Aucun commentaire:

Enregistrer un commentaire