summaryrefslogtreecommitdiffstats
path: root/server/parser
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2009-10-21 07:25:50 +0200
committerDavid Sommerseth <davids@redhat.com>2009-10-21 07:25:50 +0200
commitd620dd6619768e299394daf73af501ee64df0810 (patch)
tree7c96a2d6be79904dd12dd79b521ec6fbc7b8cee8 /server/parser
parent1e3a00ef4243b75465c31f04d1bca726bf9a71ac (diff)
Added error message when submissionqueue update to STAT_INPROG fails
Diffstat (limited to 'server/parser')
-rw-r--r--server/parser/parsethread.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/parser/parsethread.c b/server/parser/parsethread.c
index 5f24bf8..8f89ac1 100644
--- a/server/parser/parsethread.c
+++ b/server/parser/parsethread.c
@@ -282,8 +282,10 @@ void *parsethread(void *thrargs) {
// If we have a message, then process the parse job
if( (errno != EAGAIN) && (len > 0) ) {
int res = 0;
+
fprintf(stderr, "** Thread %i: Job recieved, submid: %i\n",
args->id, jobinfo.submid);
+
// Mark the job as "in progress", if successful update, continue parsing it
if( db_update_submissionqueue(args->dbc, jobinfo.submid, STAT_INPROG) ) {
res = parse_report(args->dbc, args->xslt, args->mtx_sysreg,
@@ -291,6 +293,9 @@ void *parsethread(void *thrargs) {
jobinfo.submid, jobinfo.filename);
// Set the status for the submission
db_update_submissionqueue(args->dbc, jobinfo.submid, res);
+ } else {
+ fprintf(stderr, "** ERROR ** Failed to mark submid %i as STAT_INPROG\n",
+ jobinfo.submid);
}
} else {
// If no message was retrieved, sleep for a little while