Skip to content

Commit 258577a

Browse files
Update api.py
1 parent ac698f0 commit 258577a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

modules/api/api.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -793,11 +793,17 @@ def invocations(self, req: InvocationsRequest):
793793
response = self.extras_batch_images_api(req.extras_batch_payload)
794794
response.images = self.post_invocations(response.images, quality)
795795
return response
796+
elif req.task == 'get-progress':
797+
response = self.progressapi(req.progress_payload)
798+
print("____________getting progress result: ")
799+
print(response)
800+
return response
796801
elif req.task == 'set-options':
797802
self.set_config(req.post_options_payload)
798803
print(req.post_options_payload)
804+
print(type(req.post_options_payload))
799805
print("————————————settings updated———————————")
800-
return
806+
return "options has been set"
801807
elif req.task == 'get-options':
802808
response = self.get_config()
803809
return response
@@ -820,15 +826,12 @@ def invocations(self, req: InvocationsRequest):
820826
elif req.task == 'get-cmd-flags':
821827
response = self.get_cmd_flags()
822828
return response
823-
elif req.task == 'get-progress':
824-
response = self.progressapi(req.progress_payload)
825-
return response
826829
elif req.task == 'get-all-config':
827830
response = self.get_all_config()
828831
return response
829832
elif req.task == 'do-nothing':
830833
print("nothing has happened")
831-
return
834+
return "nothing has happened"
832835
else:
833836
return InvocationsErrorResponse(error = f'Invalid task - {req.task}')
834837

0 commit comments

Comments
 (0)