Replaced 202s with more suitable 201s

This commit is contained in:
jtc42 2019-11-15 16:53:50 +00:00
parent 76af0891e9
commit dac50f1f3a
7 changed files with 10 additions and 10 deletions

View file

@ -142,4 +142,4 @@ class TimelapseAPI(MicroscopeViewPlugin):
self.timelapse_task = taskify(self.plugin.timelapse)(n_images)
# Return the state of the task (will show ID, start time, and status before the task has finished)
return jsonify(self.timelapse_task.state), 202
return jsonify(self.timelapse_task.state), 201

View file

@ -44,7 +44,7 @@ An example of a long running task may look like:
def post(self):
# Attach the long-running method as a microscope task
self.my_task = taskify(self.plugin.long_running_function)()
return jsonify(self.my_task.state), 202
return jsonify(self.my_task.state), 201
After some time, once the task has completed, it could be retreived using:
@ -132,7 +132,7 @@ For example, a timelapse plugin may look like:
self.timelapse_task = taskify(self.plugin.timelapse)(n_images)
# Return the state of the task (will show ID, start time, and status before the task has finished)
return jsonify(self.timelapse_task.state), 202
return jsonify(self.timelapse_task.state), 201
Notice that even though we never use the stage here, we still acquire the lock. This means that during the timelapse,