I’m writing a scheduler module for job scheduling. In the Create method, my code will
- store the job info into database
- add the job to a scheduler instance
But I don’t know how to deal with the scenario that the job info has been stored into database but failed to be added to the scheduler. I want to make sure the jobs in database and scheduler are consistent. My current way is to delete the job info in database once the second step fail. Does that make sense? Or is there any other best practice? Thanks!
Aucun commentaire:
Enregistrer un commentaire