-
Notifications
You must be signed in to change notification settings - Fork 84
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
Can circular tasks be asynchronous? #58
Comments
Not sure I fully understand the question. |
@kstkn |
Sorry, @siyecaoya, I still don't get it. I'll try to make an assumption that what your issue is that you want two commands (events) to be executed asynchronously. In current implementation that is only possible to achieve using callbacks, see example:
With callbacks ( I hope that helps :) If not, pls, explain what are you trying to do or wait until other people comment |
@kstkn Thank you very much for your guidance. |
no problems, @siyecaoya. Does this answer your question? |
@kstkn Should not. The business scenario is limited. I need to verify it |
it use |
$scheduleList = Schedule::find()->where(['is_enabled' => 1, 'task_type' => 1])->asArray()->all();
if (empty($scheduleList))
exit('无效用户队列!!');
foreach ($scheduleList as $key => $item) {
$schedule->command($command)->cron($item['execute']);//Synchronous block
}
The text was updated successfully, but these errors were encountered: