@logExceptions(_LOGGER)<EOL><INDENT>@g_retrySQL<EOL>def jobSetCompleted(self, jobID, completionReason, completionMsg,<EOL>useConnectionID = True):<DEDENT>
<EOL>with ConnectionFactory.get() as conn:<EOL><INDENT>query = '<STR_LIT>''<STR_LIT>''<STR_LIT>''<STR_LIT>''<STR_LIT>''<STR_LIT>'% (self.jobsTableName,)<EOL>sqlParams = [self.STATUS_COMPLETED, completionReason, completionMsg,<EOL>jobID]<EOL>if useConnectionID:<EOL><INDENT>query += '<STR_LIT>'<EOL>sqlParams.append(self._connectionID)<EOL><DEDENT>result = conn.cursor.execute(query, sqlParams)<EOL>if result != <NUM_LIT:1>:<EOL><INDENT>raise RuntimeError("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>" % (jobID))<EOL><DEDENT><DEDENT>
Change the status on the given job to completed

        Parameters:
        ----------------------------------------------------------------
        job:                 jobID of the job to mark as completed
        completionReason:    completionReason string
        completionMsg:       completionMsg string

        useConnectionID: True if the connection id of the calling function
        must be the same as the connection that created the job. Set
        to False for hypersearch workers