Download the PHP package cathy/thinkphp6-async-task without Composer
On this page you can find all versions of the php package cathy/thinkphp6-async-task. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package thinkphp6-async-task
thinkphp6-async-task
介绍
基于workerman的thinkphp6异步任务模型
安装
composer require cathy/thinkphp6-async-task
使用
创建异步任务类及方法
执行异步任务
$asyncTaskProducer = new AsyncTaskProducer(); try { $taskKey = $asyncTaskProducer->execute( new AsyncTask(DemoAsyncTasks::class, 'demo', ['name'=>'cathy']) ); echo $taskKey; } catch (ExecAsyncTaskException|InvalidAsyncTaskException $e) { echo $e->getMessage(); }
获取任务进度
try { $taskKey = ''; // 执行异步任务得到的taskKey echo json_encode(AsyncTaskAcquirer::get($taskKey)); } catch (Exception $e) { echo $e->getMessage(); }
All versions of thinkphp6-async-task with dependencies
PHP Build Version
Package Version
The package cathy/thinkphp6-async-task contains the following files
Loading the files please wait ....