dousi8559 2015-11-16 04:00
浏览 54
已采纳

beanstalkd默认wal目录

We are using Laravel with BeansTalkD for queuing in our app. Now I am stuck at a point that this command :

php artisan queue:listen

keeps getting jobs, in other words there are a lot of jobs and I have no idea how to clean the queue.

And the problem is that I ran the beanstalkd using this command:

beanstalkd -z 1024*1024

which does not specify wal directory.

I have been searching for the whole last week on how to clean beanstalk work queue, but found nothing.

Tips

  • I am running this on Mac OS X Yosemite.
  • Restarting BeansTalkD service did not solve it
  • I don't store jobs in DB so flush command is not the one. (I don't know if Laravel does that with me knowing but I don't think so)
  • I am deleting the jobs when I am done but the app generates a lot of jobs.
  • 写回答

2条回答 默认 最新

  • dongnigeng1295 2015-11-16 05:45
    关注

    If you didn't use -b option then restarting beanstalkd (again without -b) should help.

    Now if restarting for some reason doesn't work for you and you're using Laravel 5.x you can consider installing artisan-beans package and use php artisan beans:purge command to clean up your queue.


    UPDATE: Since you're on Laravel 4.2 you can

    1. install dependency-free CLI tool beanstool. Here's how install v2.0 on OS X

      wget https://github.com/tyba/beanstool/releases/download/v0.2.0/beanstool_v0.2.0_darwin_amd64.tar.gz
      tar -xvzf beanstool_v0.2.0_darwin_amd64.tar.gz
      cp beanstool_v0.2.0_darwin_amd64/beanstool /usr/local/bin/
      
    2. and then run this in bash

      for i in {1..N}; do beanstool delete -t default --state=ready; done
      

      Change N to the number of jobs you want to delete at once and default to the name of your queue (tube).

      If you wonder how many jobs you currently have in the queue run

      beanstool stats
      
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 matlab有关常微分方程的问题求解决
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable