Skip to content

Commit

Permalink
Use uppercase Job when appropriate in log messages (#35)
Browse files Browse the repository at this point in the history
* print Job with uppercase J when logging that a runonce job ran already

* change 'Job' to uppercase in some log messages to match others

---------

Co-authored-by: Martin Castillo <[email protected]>
  • Loading branch information
castilma and Martin Castillo authored Oct 20, 2024
1 parent a330bb3 commit 9aaf0eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions database.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,12 @@ wait_chld(void)
if (pid == e->e_ctrl_pid) {
if (e->e_line == NULL) {
/* the corresponding file has been removed from memory */
debug("job finished: pid %d", pid);
debug("Job finished: pid %d", pid);
}
else {

line = e->e_line;
/* debug("job finished: %s", line->cl_shell); */
/* debug("Job finished: %s", line->cl_shell); */
line->cl_numexe -= 1;
line->cl_file->cf_running -= 1;

Expand Down Expand Up @@ -590,11 +590,11 @@ wait_all(int *counter)
if (pid == e->e_ctrl_pid) {
if (e->e_line == NULL) {
/* the corresponding file has been removed from memory */
debug("job finished: pid %d", pid);
debug("Job finished: pid %d", pid);
}
else {

debug("job finished: '%s'", e->e_line->cl_shell);
debug("Job finished: '%s'", e->e_line->cl_shell);
e->e_line->cl_numexe -= 1;
e->e_line->cl_file->cf_running -= 1;

Expand Down Expand Up @@ -1438,7 +1438,7 @@ set_next_exe_startup(struct cl_t *cl, const int context,
else {
/* job has been stopped during execution :
* launch it again */
warn("job '%s' did not finish : running it again.", cl->cl_shell);
warn("Job '%s' did not finish : running it again.", cl->cl_shell);
set_serial_once(cl->cl_option);
add_serial_job(cl, -1);
}
Expand All @@ -1453,7 +1453,7 @@ set_next_exe_startup(struct cl_t *cl, const int context,
if (is_runonce(cl->cl_option) && is_hasrun(cl->cl_option)) {
/* if we get here, then context != CONTEXT_BOOT and_volatile is false */
/* do nothing: don't re-schedule or add to the job queue */
explain("job '%s' with runonce set has already run since last "
explain("Job '%s' with runonce set has already run since last "
"system startup: not re-scheduling.", cl->cl_shell);
}
else if (is_td(cl->cl_option)) {
Expand Down
2 changes: 1 addition & 1 deletion fcrondyn_svr.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ cmd_ls(struct fcrondyn_cl *client, long int *cmd, int fd, int is_root)
e = exe_list_next(exe_list)) {
if (e->e_line == NULL) {
if (is_root) {
send_msg_fd(fd, "job no more in an fcrontab: pid %d",
send_msg_fd(fd, "Job no more in an fcrontab: pid %d",
e->e_job_pid);
found = 1;
}
Expand Down

0 comments on commit 9aaf0eb

Please sign in to comment.