public void Handle(AbortWorkMessage message) { Console.WriteLine("Aborting worker: " + CoordinatorId + "-" + message.WorkerId); foreach (IActorRef worker in workers.Keys.ToList()) { WorkerConfig workerConfig = workers [worker]; if (workerConfig.WorkerId == message.WorkerId) { workers.Remove(worker); worker.Tell(new StopWorkerMessage()); return; } } }
public QuartzService() { InitializeComponent(); var config = new WorkerConfig() { RunImmediately = true, DataValue = "Passed value" }; ScheduledJob = new ScheduledJob(config, new JobKey("HelloWorldJob")); }
public Worker(ILogger <Worker> logger, WorkerConfig config) { _logger = logger; mqttCustomerClient = new MqttCustomerClient(logger); _workerConfig = config; }
public ScheduledJob(WorkerConfig config, JobKey jobKey) { this.workerConfig = config; this.jobKey = jobKey; }
static Program() { var config = new WorkerConfig() { RunImmediately = true, DataValue = "Passed value" }; // TODO ReadOptionsFromConfig(); ScheduledJob = new ScheduledJob(config, new JobKey("HelloWorldJob")); }
public NewWorkerMessage(WorkerConfig workerConfig) { this.WorkerConfig = workerConfig; }
public LocalFilesDirectory(WorkerConfig workerConfig) { DirectoryPath += String.Format(rootFolder + "{0}-{1}-{2}/", workerConfig.WorkConfig.TaskId, workerConfig.CoordinatorId, workerConfig.WorkerId); }