You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run multiple groups of daemons, each group with a different name. The daemons run correctly, but they inherit their name from the first group to run even when I explicitly specify a new name.
example code:
options1 = {
multiple: true,
app_name: task1
}
options2 = {
multiple: true,
app_name: task2
}
2.times do Daemons.call(options1) { doTask1() } end
2.times do Daemons.call(options2) { doTask2() } end
The above code correctly spawns the four tasks but incorrectly refers to all four by the name task1.
Looking at the source code, I believe the issue is here in Application.new where new applications inherit the name of their group.
Is there a better way to use Daemons such these tasks are created within different groups? (Is this intended behavior?) Or is this a bug?
The text was updated successfully, but these errors were encountered:
Yes, this is the intended behaviour, since the simple #call interface assumes that you only want one application group.
I suggest to create different ApplicationGroups yourself and use these to create your applications. Like so:
I'm trying to run multiple groups of daemons, each group with a different name. The daemons run correctly, but they inherit their name from the first group to run even when I explicitly specify a new name.
example code:
The above code correctly spawns the four tasks but incorrectly refers to all four by the name
task1
.Looking at the source code, I believe the issue is here in
Application.new
where new applications inherit the name of their group.Is there a better way to use Daemons such these tasks are created within different groups? (Is this intended behavior?) Or is this a bug?
The text was updated successfully, but these errors were encountered: