Skip to content

Commit

Permalink
Log isolate renewals. (dart-lang#8372)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos authored Dec 6, 2024
1 parent 1fee9d5 commit 86ada2f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/lib/service/entrypoint/_isolate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ class IsolateRunner {
required Duration wait,
}) async {
final isolatesToClose = [..._isolates];
final lastId = isolatesToClose.isEmpty ? null : isolatesToClose.last.id;
logger.info('About to renew $count isolate(s) '
'(closing ${isolatesToClose.length}, last: `$lastId`).');

await start(count);
// prevent traffic to hit the old instances
Expand All @@ -75,6 +78,8 @@ class IsolateRunner {
for (final i in isolatesToClose) {
await i.close();
}
logger.info('Renewed $count isolate(s) '
'(closing ${isolatesToClose.length}, last: `$lastId`).');
}

/// Send [RequestMessage] and wait for [ReplyMessage] returning
Expand Down

0 comments on commit 86ada2f

Please sign in to comment.