Skip to content

Commit ff852de

Browse files
committed
job-ingest: restart work crew on reconfig
Problem: workers are not notified when configuration changes. Stop any workers upon reconfiguration and let them restart, so they can re-read their configuration from the broker, if any.
1 parent 0086302 commit ff852de

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/modules/job-ingest/workcrew.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ int workcrew_configure (struct workcrew *crew,
171171
if (worker_set_cmdline (crew->worker[i], argc, argv) < 0)
172172
goto error;
173173
}
174+
/* Close stdin of current workers and allow them to restart on demand.
175+
* This forces them to re-acquire their configuration, if any.
176+
*/
177+
workcrew_stop_notify (crew, NULL, NULL);
174178
rc = 0;
175179
error:
176180
ERRNO_SAFE_WRAP (free, argv);

0 commit comments

Comments
 (0)