added .env variable ENABLE_BOOKABLE_ROOMS_RESERVATION_REVOCATION

to disable/enable task SummitRoomReservationRevocationCommand

Change-Id: Ie5ce24dda5b76676141ba90c32c95f3148e5ae6d
This commit is contained in:
smarcet 2019-08-05 18:27:11 -03:00
parent 187f1e2658
commit ba43168fad
3 changed files with 9 additions and 1 deletions

View File

@ -78,4 +78,6 @@ CLOUD_STORAGE_APIKEY=
CLOUD_STORAGE_PROJECT_NAME=
CLOUD_STORAGE_REGION=
# enable/disable cal sync background task
ENABLE_CAL_SYNC=true
ENABLE_CAL_SYNC=true
# enable/disable bookable rooms reservation revocation task
ENABLE_BOOKABLE_ROOMS_RESERVATION_REVOCATION=false

View File

@ -83,6 +83,11 @@ final class SummitRoomReservationRevocationCommand extends Command {
*/
public function handle()
{
$enabled = Config::get("bookable_rooms.enable_bookable_rooms_reservation_revocation", false);
if(!$enabled){
$this->info("task is not enabled!");
return false;
}
try {

View File

@ -14,4 +14,5 @@
return [
'reservation_lifetime' => env('BOOKABLE_ROOMS_RESERVATION_LIFETIME', 5),
'admin_email' => env('BOOKABLE_ROOMS_ADMIN_EMAIL'),
'enable_bookable_rooms_reservation_revocation' => env('ENABLE_BOOKABLE_ROOMS_RESERVATION_REVOCATION', false),
];