ajvb / kala

Modern Job Scheduler
MIT License
2.13k stars 187 forks source link

Delete all jobs API #160

Closed zerodivisi0n closed 6 years ago

zerodivisi0n commented 6 years ago

This PR adds the ability to delete all jobs at once, as proposed in #147.

I decided to call method DELETE /job/all, although it is not quite suitable for REST. But I think it fits better than DELETE /job.

I used the easiest way to implement the deletion - simply call Delete on each job in a loop. Another way to do it is to add methods DeleteAll to Db and Cache, but it extends interface and requires more work to be done.

Also, I added this method to the client.

ajvb commented 6 years ago

Awesome, thank you so much @zerodivisi0n!