resource->forceDelete(); switch ($this->resource->type()) { case 'application': StopApplication::run($this->resource); break; case 'standalone-postgresql': case 'standalone-redis': case 'standalone-mongodb': case 'standalone-mysql': case 'standalone-mariadb': case 'standalone-keydb': case 'standalone-dragonfly': case 'standalone-clickhouse': StopDatabase::run($this->resource); break; case 'service': StopService::run($this->resource); DeleteService::run($this->resource); break; } } catch (\Throwable $e) { ray($e->getMessage()); send_internal_notification('ContainerStoppingJob failed with: ' . $e->getMessage()); throw $e; } finally { Artisan::queue('cleanup:stucked-resources'); } } }