-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
Check status by class name #387
Comments
What is the use case for it? |
For example-I need add many users to system foreach ($idList as $id) {
if (Yii::$app->queue->isWaiting($id) || Yii::$app->queue->isReserved($id)) {
echo 'working...'
break;
}
} |
OK. That may be useful. |
Any idea how do you want to implement it? Most of backends does not allow to filter by anything except job ID, so the only way to do this would be to log IDs of jobs and query each of them separately. Exactly in the same way as you're doing it now. |
Yes. With the current info stored it is exactly how @rob006 suggests it. |
From docs - to see status need pass job id
What about check status by class name?
For example
Yii::$app->queue->isAnyWorking(testJob::class)
which mean- is any not done job for class TestJob?The text was updated successfully, but these errors were encountered: