-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Description
I have implemented a scheduler to communicate with multiple machines sequentially. The machines are working well individually. However, I'm encountering an issue with the code below when running the scheduler:
`
private void button2_Click(object sender, EventArgs e)
{
errortext = "";
MultipleMachinesJobScheduler.RunScheduler(comm.channels.Select(x => x.machine).ToList(), async (machine, scheduler) =>
{
scheduler.From(machine.Id + ".From", machine, MachineDataType.CommunicationTag).Result.Query(machine.Id + ".ConsoleQuery", QueryConsole).Result.To(machine.Id + ".To", machine).Result.Deal(machine.Id + ".Deal", OnSuccess, OnFailure).Result.Run();
},
-1, 0);
}
private void button3_Click(object sender, EventArgs e)
{
MultipleMachinesJobScheduler.CancelJob();
}
`
Issue Description:
- On the first button click, only the first machine in the array starts communicating, whereas all machines are expected to start.
- Without making any changes to the code, if I run function (click the button) again, all machines start communicating as intended.
Expected Behavior:
- All machines in the array should start communicating on the first button click.
Environment:
- Scheduler version: v1.4.3
- Development environment: Visual Studio 2022
Question: What could be causing this behavior where only the first machine starts on the initial click, and how can I ensure that all machines start communicating on the first run?
Metadata
Metadata
Assignees
Labels
No labels