a laravel celery dependency package.
参考官方包gjedeer/celery-php,为个人项目做了简化,仅支持以redis为中间人发布celery任务。
$ composer require kingjian0801/laravel-celery:dev-master
1.PostTask(发布任务)
$celery = new Celery('redis地址', '密码', '数据库','队列名称');
$celery->PostTask('任务名称', 任务数据(数组));
2.getAsyncResultMessage(查询任务状态)
$celery = new Celery('redis地址', '密码', '数据库','队列名称');
$celery->getAsyncResultMessage('任务名称','任务key值');