@@ -13,7 +13,7 @@ pub struct Input {
1313
1414struct UpsertOutput {
1515 endpoint_config_changed : bool ,
16- serverless_runner_created : bool ,
16+ pool_created : bool ,
1717}
1818
1919#[ operation]
@@ -52,31 +52,28 @@ pub async fn pegboard_runner_config_upsert(ctx: &OperationCtx, input: &Input) ->
5252 } ,
5353 ) => UpsertOutput {
5454 endpoint_config_changed : old_url != new_url || old_headers != new_headers,
55- serverless_runner_created : false ,
55+ pool_created : false ,
5656 } ,
5757 ( RunnerConfigKind :: Normal { .. } , RunnerConfigKind :: Serverless { .. } ) => {
5858 // Config type changed to serverless
5959 UpsertOutput {
6060 endpoint_config_changed : true ,
61- serverless_runner_created : true ,
61+ pool_created : true ,
6262 }
6363 }
6464 _ => {
6565 // Not serverless
6666 UpsertOutput {
6767 endpoint_config_changed : true ,
68- serverless_runner_created : false ,
68+ pool_created : false ,
6969 }
7070 }
7171 }
7272 } else {
7373 // New config
7474 UpsertOutput {
7575 endpoint_config_changed : true ,
76- serverless_runner_created : matches ! (
77- input. config. kind,
78- RunnerConfigKind :: Serverless { .. }
79- ) ,
76+ pool_created : matches ! ( input. config. kind, RunnerConfigKind :: Serverless { .. } ) ,
8077 }
8178 } ;
8279
@@ -161,9 +158,8 @@ pub async fn pegboard_runner_config_upsert(ctx: &OperationCtx, input: &Input) ->
161158 . await ?
162159 . map_err ( |err| err. build ( ) ) ?;
163160
164- // Bump autoscaler
165- if res. serverless_runner_created {
166- ctx. workflow ( crate :: workflows:: serverless:: pool:: Input {
161+ if res. pool_created {
162+ ctx. workflow ( crate :: workflows:: runner_pool:: Input {
167163 namespace_id : input. namespace_id ,
168164 runner_name : input. name . clone ( ) ,
169165 } )
@@ -172,10 +168,9 @@ pub async fn pegboard_runner_config_upsert(ctx: &OperationCtx, input: &Input) ->
172168 . unique ( )
173169 . dispatch ( )
174170 . await ?;
175- } else if input. config . affects_autoscaler ( ) {
176- // Maybe scale it
177- ctx. signal ( crate :: workflows:: serverless:: pool:: Bump { } )
178- . to_workflow :: < crate :: workflows:: serverless:: pool:: Workflow > ( )
171+ } else if input. config . affects_pool ( ) {
172+ ctx. signal ( crate :: workflows:: runner_pool:: Bump { } )
173+ . to_workflow :: < crate :: workflows:: runner_pool:: Workflow > ( )
179174 . tag ( "namespace_id" , input. namespace_id )
180175 . tag ( "runner_name" , input. name . clone ( ) )
181176 . send ( )
0 commit comments