edgurgel / verk

A job processing system that just verks! 🧛‍
https://hex.pm/packages/verk
MIT License
723 stars 65 forks source link

Add mix task to reset queues #167

Open tlvenn opened 6 years ago

tlvenn commented 6 years ago

I saw this with task_bunny and I think it's pretty useful in dev

https://github.com/shinyscorpion/task_bunny#reset-queues

edgurgel commented 6 years ago

Oh yeah that would be a great addition. It should be very simple to SSCAN for queue:* and remove all of them + inprogress I think?

klebervirgilio commented 6 years ago

@tlvenn @edgurgel Can I work on this one?

edgurgel commented 6 years ago

Fine by me! 👍 Thanks!

klebervirgilio commented 6 years ago

About removing the queues, do you guys think would be a good idea to only remove the queues listed in the config files?

Something like: https://github.com/klebervirgilio/verk/commit/c5242a1ad452e000224cc158dfb175bbf5dd2389

edgurgel commented 6 years ago

I think that's good enough for now. I'm not sure how common is the use case of starting queues dynamically 👍

tlvenn commented 6 years ago

Hi @klebervirgilio, could you please make a PR so we can review and merge? Thanks !

klebervirgilio commented 6 years ago

@edgurgel @tlvenn before I open a PR, I was wondering, do you think is a good idea use Verk.Queue instated of calling Redix directly?

IMO, the good thing about it would be that Verk.Queue is the module where knowledge about queue should live.

edgurgel commented 6 years ago

Hey sorry for the late reply!

I agree Do you mind adding a new function to Verk.Queue and using it for the mix task?

tlvenn commented 5 years ago

Hi @klebervirgilio , any update on your progress ? Thanks in advance.