Skip to content

Commit

Permalink
Attribute batch inserting: create job log entries.
Browse files Browse the repository at this point in the history
We now create job log entries when the batch attribute table
gets inserted into the database.

We write a log entry when it starts and a job entry when its done.
  • Loading branch information
pstorz committed Sep 29, 2017
1 parent 7321efb commit 6cccbd4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cats/sql_create.c
Expand Up @@ -831,6 +831,8 @@ bool db_write_batch_file_records(JCR *jcr)
Dmsg1(50,"db_create_file_record changes=%u\n",jcr->db_batch->changes);

jcr->JobStatus = JS_AttrInserting;
Jmsg1(jcr, M_INFO, 0, "Insert of attributes batch table with %u entries start\n", jcr->db_batch->changes);

if (!sql_batch_end(jcr, jcr->db_batch, NULL)) {
Jmsg1(jcr, M_FATAL, 0, "Batch end %s\n", jcr->db_batch->errmsg);
goto bail_out;
Expand Down Expand Up @@ -889,6 +891,7 @@ bool db_write_batch_file_records(JCR *jcr)
}

jcr->JobStatus = JobStatus; /* reset entry status */
Jmsg0(jcr, M_INFO, 0, "Insert of attributes batch table done\n");
retval = true;

bail_out:
Expand Down

0 comments on commit 6cccbd4

Please sign in to comment.