Justin Kotalik
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
10 additions and
5 deletions
-
samples/frontend-backend/frontend/Program.cs
-
samples/frontend-backend/tye.yaml
-
src/Microsoft.Tye.Hosting/ProcessRunner.cs
|
|
|
@ -14,9 +14,6 @@ namespace Frontend |
|
|
|
{ |
|
|
|
Activity.DefaultIdFormat = ActivityIdFormat.W3C; |
|
|
|
CreateHostBuilder(args).Build().Run(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static IHostBuilder CreateHostBuilder(string[] args) => |
|
|
|
|
|
|
|
@ -5,5 +5,4 @@ services: |
|
|
|
- name: backend |
|
|
|
project: backend/backend.csproj |
|
|
|
- name: frontend |
|
|
|
project: frontend/frontend.csproj |
|
|
|
replicas: 4 |
|
|
|
project: frontend/frontend.csproj |
|
|
|
@ -397,6 +397,15 @@ namespace Microsoft.Tye.Hosting |
|
|
|
{ |
|
|
|
_logger.LogError(0, ex, "Failed to launch process for service {ServiceName}", replica); |
|
|
|
|
|
|
|
if (!_options.Watch) |
|
|
|
{ |
|
|
|
// Only increase backoff when not watching project as watch will wait for file changes before rebuild.
|
|
|
|
backOff *= 2; |
|
|
|
} |
|
|
|
|
|
|
|
service.Restarts++; |
|
|
|
service.Replicas.TryRemove(replica, out var _); |
|
|
|
|
|
|
|
try |
|
|
|
{ |
|
|
|
await Task.Delay(backOff, processInfo.StoppedTokenSource.Token); |
|
|
|
|