Skip to content

Commit

Permalink
mxqd: unlink bad (left over) fspool files, so we don't try them over …
Browse files Browse the repository at this point in the history
…and over
  • Loading branch information
donald committed Jul 13, 2016
1 parent 6551ba1 commit f71ab9c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mxqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1864,6 +1864,7 @@ static int fspool_process_file(struct mxq_server *server,char *filename, uint64_
jlist = server_remove_job_list_by_job_id(server, job_id);
if (!jlist) {
mx_log_warning("fspool_process_file: %s : job unknown on server", filename);
unlink(filename);

This comment has been minimized.

Copy link
@mariux

mariux Jul 16, 2016

Contributor

second server running on same host might fuck things up really really bad if you just unlink here. better limit amount of warning messages. but this is a warning for a reason. so admins can unlink if they know what they are doing.. better check job in database and unlink after updating information.

return -(errno=ENOENT);
}

Expand All @@ -1873,6 +1874,7 @@ static int fspool_process_file(struct mxq_server *server,char *filename, uint64_
filename,
job->job_id,
job_id);
unlink(filename);

This comment has been minimized.

Copy link
@mariux

mariux Jul 16, 2016

Contributor

same here... ignoring such a fuckup without possibility to check spoolfile is a senseless warning...unlink is bad ;)

return -(errno=EINVAL);
}

Expand Down

0 comments on commit f71ab9c

Please sign in to comment.