I'm having a laravel setup with the Clockwork installed. And I have a artisan command that takes really long time to run, so that clockwork will consume too much memory. I still need that extension. How can I disable it when just running a command?
you can override this in the config file clockwork.php
run php artisan vendor:publish --provider='Clockwork\\Support\\Laravel\\ClockworkServiceProvider'
then apply your condition on 'enable'
You could try:
php artisan vendor:publish --provider='Clockwork\Support\Laravel\ClockworkServiceProvider'
Then it will give you a clockwork config file ( config/clockwork.php ).
config()->set('clockwork.enable', false);
// A few data-intense commands here...
config()->set('clockwork.enable', true);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.