Neil-YL commited on
Commit
afc71ff
·
1 Parent(s): be623f6

fix pause flow input

Browse files
__pycache__/prefect_utils.cpython-310.pyc CHANGED
Binary files a/__pycache__/prefect_utils.cpython-310.pyc and b/__pycache__/prefect_utils.cpython-310.pyc differ
 
maintenance_flow.py CHANGED
@@ -18,21 +18,15 @@ def request_wells_maintenance(maintenance_type):
18
  message += f"\n\nOT2-LCM requests a {maintenance_type}, please open the <{flow_run_url}|paused flow run>, complete with your user name and then click 'Resume'"
19
  slack_block.notify(message)
20
 
21
- user_input = pause_flow_run(
22
- wait_for_input={
23
- "confirmation": f"I have finished {maintenance_type}",
24
- "operator": "Enter your name:"
25
- },
26
- timeout=600
27
- )
28
-
29
- set_maintenance_status(maintenance_type, 0)
30
 
31
  if maintenance_type == "wellplate_maintenance":
32
  generate_empty_well()
33
- msg_out = f"Updating wells status on DB by {user_input['operator']}"
34
  logger.info(msg_out)
35
-
36
- insert_maintenance_log(maintenance_type, user_input["operator"])
37
 
38
  return msg_out
 
18
  message += f"\n\nOT2-LCM requests a {maintenance_type}, please open the <{flow_run_url}|paused flow run>, complete with your user name and then click 'Resume'"
19
  slack_block.notify(message)
20
 
21
+ user = pause_flow_run(wait_for_input=str, timeout=600)
22
+
23
+ set_maintenance_status(maintenance_type,0)
 
 
 
 
 
 
24
 
25
  if maintenance_type == "wellplate_maintenance":
26
  generate_empty_well()
27
+ msg_out = f"Updating wells status on DB by {user}"
28
  logger.info(msg_out)
29
+
30
+ insert_maintenance_log(maintenance_type, user)
31
 
32
  return msg_out