thinkphp5.0无法使用think-queue包,php think queue:work命令不存在

最近用队列,用了官方的队列包top-think/think-queue,安装后成功的将数据写入了队列,但是去消费队列,也就是使用php think queue:work --queue xxx时,提示命令不存在,然后执行php think 根本看不到queue开头的command,也就是这个命令似乎在这个版本没有?

D:\directory>php think queue:work



  [InvalidArgumentException]
  There are no commands defined in the "queue" namespace.




D:\directory>php think
Think Console version 0.1

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display this help message
  -V, --version         Display this console version
  -q, --quiet           Do not output any message
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  build              Build Application Dirs
  clear              Clear runtime file
  help               Displays help for a command
  list               Lists commands
 make
  make:controller    Create a new resource controller class
  make:model         Create a new model class
 optimize
  optimize:autoload  Optimizes PSR0 and PSR4 packages to be loaded with classmaps too, good for production.
  optimize:config    Build config and common file cache.
  optimize:route     Build route cache.
  optimize:schema    Build database schema cache.

有遇到过类似问题的兄弟吗?

绝地无双
浏览 3535回答 3
3回答

大话西游666

解决了,是不小心把application重命名为app了,在think中加载了application目录,然后提示不存在的错误信息

拉莫斯之舞

感谢 按照你的方法解决了。。。不过现在不包命名空间的错误了 但是执行命令之后 什么也没发生。。。。 是什么原因。。。
打开App,查看更多内容
随时随地看视频慕课网APP