Skip to content

Commit

Permalink
Merge branch 'mxqsub'
Browse files Browse the repository at this point in the history
* mxqsub:
  mxqsub: Let --verbose be more verbose
  • Loading branch information
mariux committed May 22, 2015
2 parents 129852c + 85a161e commit 1b6a8bd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mxqsub.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,11 @@ static int mxq_submit_task(struct mx_mysql *mysql, struct mxq_job *j, int flags)
mx_log_err("Failed to add new group.");
return -(errno=EIO);
}

mx_log_info("The new job will be added to new group with group_id=%lu", g->group_id);

} else {
mx_log_info("The new job will be attached to existing group with group_id=%lu", g->group_id);
}

assert(g->group_id);
Expand All @@ -393,6 +398,8 @@ static int mxq_submit_task(struct mx_mysql *mysql, struct mxq_job *j, int flags)
return -(errno=EIO);
}

mx_log_info("The new job has been queued successfully with job_id=%lu in group with group_id=%lu", j->job_id, g->group_id);

assert(j->job_id);

return res;
Expand Down Expand Up @@ -738,10 +745,14 @@ int main(int argc, char *argv[])
res = mx_mysql_connect_forever(&mysql);
assert(res == 0);

mx_log_info("MySQL: Connection to database established.");

res = mxq_submit_task(mysql, &job, flags);

mx_mysql_finish(&mysql);

mx_log_info("MySQL: Connection to database closed.");

if (res < 0) {
mx_log_err("Job submission failed: %m");
return 1;
Expand Down

0 comments on commit 1b6a8bd

Please sign in to comment.