Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cli features #33

Open
clafouti2104 opened this issue Mar 12, 2013 · 6 comments
Open

Cli features #33

clafouti2104 opened this issue Mar 12, 2013 · 6 comments
Labels

Comments

@clafouti2104
Copy link

Hello,

Is there a way to get the queue length?
Indeed, I run the method doBackgroundJob when I want to execute an action but I got a problem if the worker isn't launched : my queue increases without any reason. So I'd like to know the queue length in order to avoid useless doBackgroundJob.

Thanks for the answer

@bmeynell
Copy link
Contributor

nc <hostname> 4730
status

@bmeynell
Copy link
Contributor

Or write a script to do that, or use a persistent store (sqlite, drizzle, etc.) and do a count on the number of rows.

@clafouti2104
Copy link
Author

thanks for the comment, I got another question:
when I run

nc localhost 4730
status

I got something like this

 worker ~ function 184 0   0

Is there a way or command to reset the queue?

@bmeynell
Copy link
Contributor

"184" is number of jobs queued, "0" is number of jobs processing, the final "0" is number of workers connected that can process that job.

To clear the queue, you can just restart gearmand.

There's also a 'gearman' command you can install (e.g., on ubuntu) that provides some utilities.

@bmeynell
Copy link
Contributor

bmeynell commented May 8, 2013

Leaving this open as things like this could make for a handy CLI tool.

@mmoreram
Copy link
Owner

Could be nice, with this new version, add some new cli features.

Any ideas?

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

No branches or pull requests

3 participants