Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultipleMachinesJobScheduler.RunScheduler only start first machine, after restart all machines start #27

Open
Metin-Gunduz opened this issue Dec 20, 2024 · 0 comments

Comments

@Metin-Gunduz
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant