Created
June 24, 2017 14:01
-
-
Save tomliversidge/353f658dc01d2eb5fb56738d90d10820 to your computer and use it in GitHub Desktop.
Saga 5.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
Console.WriteLine("Starting"); | |
var random = new Random(); | |
var numberOfTransfers = 1000; | |
var uptime = 99.99; | |
var retryAttempts = 3; | |
var refusalProbability = 0.01; | |
var busyProbability = 0.05; | |
var provider = new InMemoryProvider(); | |
var props = Actor.FromProducer(() => new Runner(numberOfTransfers, uptime, refusalProbability, busyProbability, retryAttempts, false)) | |
.WithChildSupervisorStrategy(new OneForOneStrategy((pid, reason) => SupervisorDirective.Restart, retryAttempts, null)); | |
Console.WriteLine("Spawning runner"); | |
var runner = Actor.SpawnNamed(props, "runner"); | |
Console.ReadLine(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment