docs: def finish(db, job_id, status):
      """
      Set the job columns `is_running`, `status`, and `stop_time`.
  
      :param db:
          a :class:`openquake.server.dbapi.Db` instance
      :param job_id:
          ID of the current job
      :param status:
          a string such as 'successful' or 'failed'
      """
      db('UPDATE job SET ?D WHERE id=?x',
         dict(is_running=False, status=status, stop_time=datetime.utcnow()),
         job_id)