Fix cleanup of stuck resources in CleanupStuckedResources.php
This commit is contained in:
parent
0b2c92cbe5
commit
d7b359e432
@ -62,7 +62,7 @@ private function cleanup_stucked_resources()
|
|||||||
$keydbs = StandaloneKeydb::withTrashed()->whereNotNull('deleted_at')->get();
|
$keydbs = StandaloneKeydb::withTrashed()->whereNotNull('deleted_at')->get();
|
||||||
foreach ($keydbs as $keydb) {
|
foreach ($keydbs as $keydb) {
|
||||||
echo "Deleting stuck keydb: {$keydb->name}\n";
|
echo "Deleting stuck keydb: {$keydb->name}\n";
|
||||||
$redis->forceDelete();
|
$keydb->forceDelete();
|
||||||
}
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
echo "Error in cleaning stuck keydb: {$e->getMessage()}\n";
|
echo "Error in cleaning stuck keydb: {$e->getMessage()}\n";
|
||||||
@ -71,7 +71,7 @@ private function cleanup_stucked_resources()
|
|||||||
$dragonflies = StandaloneDragonfly::withTrashed()->whereNotNull('deleted_at')->get();
|
$dragonflies = StandaloneDragonfly::withTrashed()->whereNotNull('deleted_at')->get();
|
||||||
foreach ($dragonflies as $dragonfly) {
|
foreach ($dragonflies as $dragonfly) {
|
||||||
echo "Deleting stuck dragonfly: {$dragonfly->name}\n";
|
echo "Deleting stuck dragonfly: {$dragonfly->name}\n";
|
||||||
$redis->forceDelete();
|
$dragonfly->forceDelete();
|
||||||
}
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
echo "Error in cleaning stuck dragonfly: {$e->getMessage()}\n";
|
echo "Error in cleaning stuck dragonfly: {$e->getMessage()}\n";
|
||||||
@ -80,7 +80,7 @@ private function cleanup_stucked_resources()
|
|||||||
$clickhouses = StandaloneClickhouse::withTrashed()->whereNotNull('deleted_at')->get();
|
$clickhouses = StandaloneClickhouse::withTrashed()->whereNotNull('deleted_at')->get();
|
||||||
foreach ($clickhouses as $clickhouse) {
|
foreach ($clickhouses as $clickhouse) {
|
||||||
echo "Deleting stuck clickhouse: {$clickhouse->name}\n";
|
echo "Deleting stuck clickhouse: {$clickhouse->name}\n";
|
||||||
$redis->forceDelete();
|
$clickhouse->forceDelete();
|
||||||
}
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
echo "Error in cleaning stuck clickhouse: {$e->getMessage()}\n";
|
echo "Error in cleaning stuck clickhouse: {$e->getMessage()}\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user