Skip to content

Commit

Permalink
We really want our transports to be ready before we try to apply serv…
Browse files Browse the repository at this point in the history
…ices
  • Loading branch information
tom-binary committed May 24, 2024
1 parent 6acebb8 commit 244f5b0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/Myriad/Commands.pm
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ async method service (@args) {
}
}

# Ensure we have valid transports in place before we start
for my $type (qw(storage subscription rpc)) {
$log->tracef('Set up transport for [%s]', $type);
my $method = $myriad->config->${\"${type}_transport"}->as_string . '_transport';
my $instance = $myriad->$method;
await $instance->start if $instance->can('start');
}

# Load services into Myriad but don't start them yet

$log->tracef('Attempt to add services for %s', join ',', @services_modules);
Expand Down

0 comments on commit 244f5b0

Please sign in to comment.