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

adminqueue being run by backend though fake cronjob in bootstrap is switched off #394

Closed
jettero777 opened this issue Oct 29, 2019 · 4 comments · Fixed by #396
Closed

adminqueue being run by backend though fake cronjob in bootstrap is switched off #394

jettero777 opened this issue Oct 29, 2019 · 4 comments · Fixed by #396
Assignees

Comments

@jettero777
Copy link
Contributor

jettero777 commented Oct 29, 2019

I need a queue for some custom jobs so I try to use luya's builtin \Yii::$app->adminqueue for own jobs. In order to not create another similar queue and log.

But though I don't use fake cronjob ($autoBootstrapQueue = false) the queue jobs are triggered anyway when I use admin backend, because there is call Yii::$app->adminqueue->run(false) in TimestampController.
And if jobs are heavy (several minutes to complete) it gets impossible to work in admin, because it freezes until job is complete.

So if it is intended behavior I think better to document somewhere that adminqueue should be used only for small lightweight jobs.

@nadar
Copy link
Member

nadar commented Oct 29, 2019

hey @jettero777 so maybe we should not run the que if autoBootstrapQueue is disabled. This would fix your problem and would be more straight. What do you think?

@jettero777
Copy link
Contributor Author

hey @jettero777 so maybe we should not run the que if autoBootstrapQueue is disabled. This would fix your problem and would be more straight. What do you think?

Hi @nadar yep, it should resolve it.
And if autoBootstrapQueue is enabled it will run in bootstrap anyway as I understand, so this can be left as only place to run it (and CLI of course).

@nadar
Copy link
Member

nadar commented Oct 29, 2019

would you like to send a PR?

@jettero777
Copy link
Contributor Author

Yes, I will send soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants