From 85a161e6a9e6575d4aa6030a618b53d443359177 Mon Sep 17 00:00:00 2001 From: Marius Tolzmann Date: Thu, 21 May 2015 16:26:48 +0200 Subject: [PATCH] mxqsub: Let --verbose be more verbose --- mxqsub.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mxqsub.c b/mxqsub.c index e979213..d48ce31 100644 --- a/mxqsub.c +++ b/mxqsub.c @@ -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); @@ -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; @@ -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;