Skip to content

Commit

Permalink
fix: add a few missing db.close() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
eseidel committed Oct 1, 2023
1 parent f779283 commit bf807ec
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/cli/bin/debug_surveys.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Future<void> command(FileSystem fs, ArgResults argResults) async {
nearbyMarketSymbol: mineSymbol,
);
logger.info('$survey');
// Required or main will hang.
await db.close();
}

void main(List<String> args) async {
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/bin/earning_rate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ Future<void> command(FileSystem fs, ArgResults argResults) async {
final credits = creditsString(last.agentCredits).padLeft(creditsWidth);
logger.info('-$sinceLast $credits');
}
// Print per-ship data.
// Required or main will hang.
await db.close();
}

void main(List<String> args) async {
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/bin/list_repeated_transactions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ Future<void> command(FileSystem fs, ArgResults argResults) async {
// final p = PolyFit(x, y, degree);
// print(p);
}
// Required or main will hang.
await db.close();
}

void main(List<String> args) async {
Expand Down
1 change: 1 addition & 0 deletions packages/cli/bin/recent_deals.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,6 @@ Future<void> command(FileSystem fs, ArgResults argResults) async {
logger.info(describeTransaction(transaction));
}

// Required or main will hang.
await db.close();
}
3 changes: 3 additions & 0 deletions packages/cli/bin/route_perf.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,7 @@ Future<void> command(FileSystem fs, ArgResults argResults) async {
'took ${result.duration.inMilliseconds}ms',
);
}

// Required or main will hang.
await db.close();
}
1 change: 1 addition & 0 deletions packages/cli/bin/systems_reachable_from_factions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Future<void> command(FileSystem fs, ArgResults argResults) async {
final reachable = clusterCache.connectedSystemCount(hq.systemSymbol);
logger.info('${faction.symbol}: $reachable');
}
// Required or main will hang.
await db.close();
}

Expand Down

0 comments on commit bf807ec

Please sign in to comment.