You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Program.cs 769 B

123456789101112131415161718192021
  1. var builder = DistributedApplication.CreateBuilder(args);
  2. builder.AddAzureProvisioning();
  3. var orleans = builder.AddOrleans("orleans")
  4. .WithDevelopmentClustering()
  5. .WithMemoryReminders()
  6. .WithMemoryGrainStorage("agent-state");
  7. var agentHost = builder.AddProject<Projects.Greeter_AgentHost>("agenthost")
  8. .WithReference(orleans);
  9. builder.AddProject<Projects.Greeter_AgentWorker>("csharp-worker")
  10. .WithExternalHttpEndpoints()
  11. .WithReference(agentHost);
  12. var ep = agentHost.GetEndpoint("http");
  13. builder.AddExecutable("python-worker", "hatch", "../../../../python/", "run", "python", "worker_example.py")
  14. .WithEnvironment("AGENT_HOST", $"{ep.Property(EndpointProperty.Host)}:{ep.Property(EndpointProperty.Port)}");
  15. builder.Build().Run();