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

Don`t found driver [] in task [PhpSms], please define it for current task #59

Closed
yaoshanliang opened this issue Feb 16, 2016 · 11 comments
Closed

Comments

@yaoshanliang
Copy link
Contributor

php artisan queue:listen之后提示Dont found driver [] in task [PhpSms], please define it for current task`

@toplan
Copy link
Owner

toplan commented Feb 16, 2016

你好,请问你在配置文件config/phpsms.php中配置可用代理器没有?

@yaoshanliang
Copy link
Contributor Author

@toplan 配置了,配置了luosimao的,然后'enable' => ['Luosimao' => '20 backup']

@yaoshanliang
Copy link
Contributor Author

@toplan
错误日志Toplan\TaskBalance\Task->runDriver(NULL)

  • task-balancer下Task.php文件run方法中参数$driverName为空,执行$driverName = $this->getDriverNameByWeight();
  • getDriverNameByWeight中$this->drivers为空,执行return $this->driverNameRand();
  • driverNameRand中$this->drivers还是空的,就return了

@toplan
Copy link
Owner

toplan commented Feb 16, 2016

嗯,根据报错是说没有代理器,你通过PhpSms::getEnableAgents()方法看看读取到代理器没

@yaoshanliang
Copy link
Contributor Author

有的,和我配置的一样,array:1 [ "Luosimao" => "20 backup"]

@toplan
Copy link
Owner

toplan commented Feb 16, 2016

嗯,那就太奇怪了,如果不通过队列,直接发送也是这个错误吗?

@yaoshanliang
Copy link
Contributor Author

加上PhpSms::queue(false);后直接发送正常。

@toplan
Copy link
Owner

toplan commented Feb 16, 2016

你使用的什么队列系统呢?

@yaoshanliang
Copy link
Contributor Author

@toplan redis

@mani95lisa
Copy link

@toplan 同样的问题,也是用的redis呢

toplan added a commit that referenced this issue Apr 15, 2016
toplan added a commit that referenced this issue Apr 15, 2016
use phpsms v1.3.0 to fix issue #59
@toplan
Copy link
Owner

toplan commented Apr 15, 2016

@yaoshanliang @mani95lisa 该问题已解决,请更新版本到v2.3.1

@toplan toplan closed this as completed Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants