Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Specifying worker names with stop command #45

Open
shadyb opened this issue Jan 28, 2015 · 4 comments
Open

Specifying worker names with stop command #45

shadyb opened this issue Jan 28, 2015 · 4 comments

Comments

@shadyb
Copy link

shadyb commented Jan 28, 2015

I am going to implement a feature that allows users to specify the worker to kill in command line. This is useful if you are using some automation/CI tools (jenkins, ansible, puppet etc). There are going to be two additional options to the stop command: --worker and --count.

The --worker option allows you to specify a queue name to kill. By default it will kill all workers with that name.

The --count option works in tandem with the --worker option and allows you to specify how many to kill.

I'm not sure if you accept feature additions to your codebase, but if you want, I can make a pull request, implement it and then merge back into your repo. That way others can benefit.

Let me know what you think

@wa0x6e
Copy link
Owner

wa0x6e commented Jan 28, 2015

I don't quite get what you're trying to do. The stop command already print a list of workers, and you can choose the worker you want to stop.

I think there's naming issue, but are you trying to stop a worker, by the name of the polled queue ? In that case, a --queue option would make more sense.

@shadyb
Copy link
Author

shadyb commented Jan 28, 2015

Sorry, I mean't --queue (been working very long hours as of late so am tripping up all over the place). It does print a list of workers, but then it requires stdin input and that's a problem if you are using automation tools.

Take my configuration for example, we have a jenkins project which allows you to specify queues to start. I make a selection and it plugs the variables into a bash script and runs it. You can't do the same with the stop command and I don't want junior devs having access to our queuing servers. At the moment, the only solution we have is to kill all the workers which is high inconvenient.

fresque stop --queue my_queue --count 2 // that will kill two workers from my_queue
fresque stop --queue my_queue // that will kill all workers from my_queue

@wa0x6e
Copy link
Owner

wa0x6e commented Jan 28, 2015

Interesting feature, 👍

@shadyb
Copy link
Author

shadyb commented Jan 29, 2015

cool, I'll make a PR tomorrow then :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants