Skip to content

Commit

Permalink
mxqd: limit killall_over_time to run every minute if jobs are running
Browse files Browse the repository at this point in the history
  • Loading branch information
mariux committed Oct 24, 2015
1 parent 425226e commit 4e2b1cd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mxqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1527,8 +1527,11 @@ int killall_over_time(struct mxq_server *server)

assert(server);

/* limit killing to every >= 5 minutes */
mx_within_rate_limit_or_return(5*60, 1);
if (!server->jobs_running)
return 0;

/* limit killing to every >= 60 seconds */
mx_within_rate_limit_or_return(60, 1);

mx_log_info("killall_over_time: Sending signals to all jobs running longer than requested.");

Expand Down

0 comments on commit 4e2b1cd

Please sign in to comment.