def pause_task(self): scheduler.pause_job(self.creation_time) self.status = 'suspended' db.session.commit()
def pause(self): scheduler.pause_job(self.creation_time) self.status = 'Pause' db.session.commit()