order_service = $order_service; } /** * Execute the console command. * * @return mixed */ public function handle() { $enabled = Config::get("registration.enable_orders_reservation_revocation", true); if (!$enabled) { $this->info("task is not enabled!"); return false; } try { $this->info("processing summit orders reservations"); $start = time(); $lifetime = intval(Config::get("registration.reservation_lifetime", 30)); Log::info(sprintf("RegistrationSummitOrderRevocationCommand: using lifetime of %s ", $lifetime)); Log::info("RegistrationSummitOrderRevocationCommand: invoking revokeReservedOrdersOlderThanNMinutes"); $this->order_service->revokeReservedOrdersOlderThanNMinutes($lifetime); $end = time(); $delta = $end - $start; $this->info(sprintf("execution call %s seconds", $delta)); $start = time(); Log::info("RegistrationSummitOrderRevocationCommand: invoking confirmOrdersOlderThanNMinutes"); $this->order_service->confirmOrdersOlderThanNMinutes($lifetime); $end = time(); $delta = $end - $start; $this->info(sprintf("execution call %s seconds", $delta)); } catch (Exception $ex) { Log::error($ex); } } }