keylimetoolbox / resque-kubernetes

Run Resque (and ActiveJob) workers as Kubernetes Jobs and autoscale from 0!
MIT License
54 stars 15 forks source link

How does the scheduler start scheduling? #27

Closed arianf closed 3 years ago

arianf commented 3 years ago

I'm curious how this gem runs jobs from the scheduler? I don't see anything in the README.md

jeremywadsack commented 3 years ago

Hi @arianf. resque-kubernetes doesn't do anything special for the resque-scheduler extension. I don't see any reason why you couldn't run it though.

You would need to run the resque-scheduler server as a separate pod/deployment in your Kubernetes cluster. resque-scheduler sends "due" jobs to their appropriate queue. When it calls enqueue on the job, it will fire the hook to spin up new Kubernetes Job pods (if needed) and autoscale just as with normal jobs.

Let me know if this works for you. If so, happy to accept a PR for a README update including a mention of it.

arianf commented 3 years ago

Hmm thanks for explaining that!