Using Laravel 5.2 to put the app in maintenance mode using artisan:
artisan down
However console commands don't seem to work, and my queues have paused.
How to allow console commands to run, but prevent any users from logging in?
Use case: cron job calls artisan command which polls a directory on a server. When it finds a semaphore it queues the related files for processing. There are times when I just want to stop any users from using the gui, but still allow the queues to get processed.
-
put the app in a state where http/s routes are disabled, but console commands can still run.
-
still have the ability to run artisan down when I want to, say, restore a backup. In this case, it is understood that console commands will be blocked.
These SO answers were helpful, but not exactly what is needed.
[Laravel FrozenNode Administrator run in maintenance mode
[Laravel 4 bypass maintenance mode for a route
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire