throw errors in jobs

This commit is contained in:
Andras Bacsai 2023-08-24 21:09:58 +02:00
parent 90dba34ecc
commit b674a0ed88
14 changed files with 19 additions and 5 deletions

View File

@ -44,6 +44,7 @@ public function __invoke(bool $force)
ray('InstanceAutoUpdateJob failed');
ray($th->getMessage());
send_internal_notification('InstanceAutoUpdateJob failed: ' . $th->getMessage());
throw $th;
}
}

View File

@ -43,7 +43,7 @@ class GithubPrivateRepositoryDeployKey extends Component
'publish_directory' => 'Publish directory',
];
private object $repository_url_parsed;
private GithubApp|GitlabApp $git_source;
private GithubApp|GitlabApp|null $git_source = null;
private string $git_host;
private string $git_repository;
private string $git_branch;

View File

@ -46,8 +46,9 @@ public function handle(): void
$this->application->status = $status;
$this->application->save();
}
} catch (\Exception $e) {
ray($e->getMessage());
} catch (\Exception $th) {
ray($th->getMessage());
throw $th;
}
}
}

View File

@ -136,6 +136,7 @@ public function handle(): void
} catch (Exception $e) {
ray($e);
$this->fail($e);
throw $e;
} finally {
if (isset($this->docker_compose_base64)) {
$readme = generate_readme_file($this->application->name, $this->application_deployment_queue->updated_at);

View File

@ -24,6 +24,7 @@ public function handle(): void
} catch (\Throwable $th) {
send_internal_notification('CheckResaleLicenseJob failed with: ' . $th->getMessage());
ray($th);
throw $th;
}
}
}

View File

@ -31,6 +31,7 @@ public function handle(): void
} catch (\Exception $e) {
send_internal_notification('CleanupInstanceStuffsJob failed with error: ' . $e->getMessage());
ray($e->getMessage());
throw $e;
}
}

View File

@ -97,7 +97,7 @@ public function handle(): void
} catch (\Throwable $th) {
ray($th->getMessage());
send_internal_notification('DatabaseBackupJob failed with: ' . $th->getMessage());
//throw $th;
throw $th;
}
}

View File

@ -50,6 +50,7 @@ public function handle(): void
} catch (\Exception $e) {
send_internal_notification('DatabaseContainerStatusJob failed with: ' . $e->getMessage());
ray($e->getMessage());
throw $e;
}
}
}

View File

@ -51,6 +51,7 @@ public function handle(): void
} catch (\Exception $e) {
send_internal_notification('DockerCleanupJob failed with: ' . $e->getMessage());
ray($e->getMessage());
throw $e;
}
}

View File

@ -34,7 +34,7 @@ public function handle()
} catch (\Throwable $th) {
ray($th->getMessage());
send_internal_notification('ProxyCheckJob failed with: ' . $th->getMessage());
//throw $th;
throw $th;
}
}
}

View File

@ -58,6 +58,8 @@ public function handle(): void
$this->server->save();
}
send_internal_notification('ProxyContainerStatusJob failed with: ' . $e->getMessage());
ray($e->getMessage());
throw $e;
}
}
}

View File

@ -31,6 +31,7 @@ public function handle()
} catch (\Throwable $th) {
send_internal_notification('ProxyStartJob failed with: ' . $th->getMessage());
ray($th->getMessage());
throw $th;
}
}
}

View File

@ -39,6 +39,8 @@ public function handle(): void
}
} catch (\Exception $th) {
send_internal_notification('ResourceStatusJob failed with: ' . $th->getMessage());
ray($th);
throw $th;
}
}
}

View File

@ -36,6 +36,8 @@ public function handle()
});
} catch (\Throwable $th) {
send_internal_notification('SubscriptionInvoiceFailedJob failed with: ' . $th->getMessage());
ray($th->getMessage());
throw $th;
}
}
}