Search code examples
redisjobs

Resource Freeing in Redis Jobs


I've an application that sends redid jobs output to front-end via socket. There are some special type nodes those are special & needs to wait to finish their jobs.So I'm using infinite waiting to finish those jobs to complete. Something like below.

While True:
  If job.status() == "finished" :
     Break

I want to if there's any way to free the resource & re run the jobs from their previous state.

Tried a solution to stay awake all the time. I want a solution where the resources are not bound to one jobs , the system can utilize their resources to other jobs


Solution

  • Well what you can do is, To return if the job is special. And save the states of jobs in Redis Environment. If u have a back end in your application, you can always check if the special jobs are finished running.