File tree Expand file tree Collapse file tree
engine/packages/api-peer/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,15 +97,6 @@ pub async fn create(
9797) -> Result < CreateResponse > {
9898 let namespace_id = Id :: new_v1 ( ctx. config ( ) . dc_label ( ) ) ;
9999
100- ctx. workflow ( namespace:: workflows:: namespace:: Input {
101- namespace_id,
102- name : body. name . clone ( ) ,
103- display_name : body. display_name . clone ( ) ,
104- } )
105- . tag ( "namespace_id" , namespace_id)
106- . dispatch ( )
107- . await ?;
108-
109100 let mut create_sub = ctx
110101 . subscribe :: < namespace:: workflows:: namespace:: CreateComplete > ( (
111102 "namespace_id" ,
@@ -116,6 +107,15 @@ pub async fn create(
116107 . subscribe :: < namespace:: workflows:: namespace:: Failed > ( ( "namespace_id" , namespace_id) )
117108 . await ?;
118109
110+ ctx. workflow ( namespace:: workflows:: namespace:: Input {
111+ namespace_id,
112+ name : body. name . clone ( ) ,
113+ display_name : body. display_name . clone ( ) ,
114+ } )
115+ . tag ( "namespace_id" , namespace_id)
116+ . dispatch ( )
117+ . await ?;
118+
119119 tokio:: select! {
120120 res = create_sub. next( ) => { res?; } ,
121121 res = fail_sub. next( ) => {
You can’t perform that action at this time.
0 commit comments