def _view_finish(self, queue_type, queue_id, job_id):
response = {<EOL>'<STR_LIT:status>': '<STR_LIT>'<EOL>}<EOL>request_data = {<EOL>'<STR_LIT>': queue_type,<EOL>'<STR_LIT>': queue_id,<EOL>'<STR_LIT>': job_id<EOL>}<EOL>try:<EOL><INDENT>response = self.sq.finish(**request_data)<EOL>if response['<STR_LIT:status>'] == '<STR_LIT>':<EOL><INDENT>return jsonify(**response), <NUM_LIT><EOL><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>response['<STR_LIT:message>'] = e.message<EOL>return jsonify(**response), <NUM_LIT><EOL><DEDENT>return jsonify(**response)<EOL>
Marks a job as finished in SharQ.