Skip to content

Commit

Permalink
fix: auto-restart services on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
eseidel committed Aug 12, 2024
1 parent 987cb24 commit bc85324
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ services:
depends_on:
db:
condition: service_healthy
restart: on-failure
cli:
build:
context: ./packages
Expand All @@ -28,6 +29,7 @@ services:
condition: service_started
db:
condition: service_healthy
restart: on-failure
idle:
build:
context: ./packages
Expand All @@ -39,6 +41,7 @@ services:
condition: service_started
db:
condition: service_healthy
restart: on-failure
db:
image: postgres:15.3-alpine3.18
restart: always
Expand Down
8 changes: 7 additions & 1 deletion packages/cli/lib/central_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,13 @@ class CentralCommand {
SystemsCache systems,
SystemSymbol systemSymbol,
) async {
final jumpGate = systems.jumpGateWaypointForSystem(systemSymbol);
final jumpGate;
try {
jumpGate = systems.jumpGateWaypointForSystem(systemSymbol);
} catch (e) {
print(e);
return null;
}
if (jumpGate == null) {
return null;
}
Expand Down

0 comments on commit bc85324

Please sign in to comment.