I currently do service using beanstalkd and node.js. I would like when jobs fail, retry n time before give up the job. If the job succede i want do it the same job 10 time. So, what is the best practice, stock in mongo db with the jobId the error and success count, or delete and put a new job with a an error and success count in the body.
I dont know if i'm clear? so tell me , thanks a lot
You have a couple of ways to do this:
You should do the later, and you don't need MongoDB as a second dependency.