nbaldwin commited on
Commit
d271893
·
1 Parent(s): 7437003

Clean Versions

Browse files
Files changed (1) hide show
  1. run.py +9 -13
run.py CHANGED
@@ -45,26 +45,22 @@ if __name__ == "__main__":
45
 
46
 
47
  #3. ~~~~ Serve The Flow ~~~~
48
- serve_utils.recursive_serve_flow(
49
  cl = cl,
50
- flow_type="FixedReplyFlowModule",
51
- default_config=cfg,
52
- default_state=None,
53
- default_dispatch_point="coflows_dispatch"
54
  )
55
 
56
  #4. ~~~~~Start A Worker Thread~~~~~
57
- run_dispatch_worker_thread(cl, dispatch_point="coflows_dispatch", flow_modules_base_path=FLOW_MODULES_PATH)
58
 
59
  #5. ~~~~~Mount the flow and get its proxy~~~~~~
60
- proxy_flow = serve_utils.recursive_mount(
61
  cl=cl,
62
- client_id="local",
63
- flow_type="FixedReplyFlowModule",
64
- config_overrides=None,
65
- initial_state=None,
66
- dispatch_point_override=None,
67
- )
68
 
69
  #6. ~~~ Get the data ~~~
70
  data = {"id": 0}
 
45
 
46
 
47
  #3. ~~~~ Serve The Flow ~~~~
48
+ serve_utils.serve_flow(
49
  cl = cl,
50
+ flow_class_name="flow_modules.aiflows.FixedReplyFlowModule.FixedReplyFlow",
51
+ flow_endpoint="FixedReplyFlow",
 
 
52
  )
53
 
54
  #4. ~~~~~Start A Worker Thread~~~~~
55
+ run_dispatch_worker_thread(cl)
56
 
57
  #5. ~~~~~Mount the flow and get its proxy~~~~~~
58
+ proxy_flow= serve_utils.get_flow_instance(
59
  cl=cl,
60
+ flow_endpoint="FixedReplyFlow",
61
+ user_id="local",
62
+ config_overrides = cfg
63
+ )
 
 
64
 
65
  #6. ~~~ Get the data ~~~
66
  data = {"id": 0}