11use gas:: prelude:: * ;
22use rivet_data:: converted:: ActorByKeyKeyData ;
3- use rivet_runner_protocol as protocol;
43use universaldb:: options:: MutationType ;
54use universaldb:: utils:: IsolationLevel :: * ;
65
@@ -15,9 +14,6 @@ pub(crate) struct Input {
1514 pub name : String ,
1615 pub key : Option < String > ,
1716 pub generation : u32 ,
18- /// Whether or not to send signals to the pb actor. In the case that the actor was already stopped
19- /// or exited, signals are unnecessary.
20- pub kill : bool ,
2117}
2218
2319#[ workflow]
@@ -33,19 +29,6 @@ pub(crate) async fn pegboard_actor_destroy(ctx: &mut WorkflowCtx, input: &Input)
3329 } )
3430 . await ?;
3531
36- // Destroy actor
37- if let ( Some ( runner_workflow_id) , true ) = ( res. runner_workflow_id , & input. kill ) {
38- ctx. signal ( crate :: workflows:: runner:: Command {
39- inner : protocol:: Command :: CommandStopActor ( protocol:: CommandStopActor {
40- actor_id : input. actor_id . to_string ( ) ,
41- generation : input. generation ,
42- } ) ,
43- } )
44- . to_workflow_id ( runner_workflow_id)
45- . send ( )
46- . await ?;
47- }
48-
4932 // If a slot was allocated at the time of actor destruction then bump the serverless autoscaler so it can scale down
5033 // if needed
5134 if res. allocated_serverless_slot {
@@ -75,7 +58,6 @@ struct UpdateStateAndDbInput {
7558
7659#[ derive( Debug , Serialize , Deserialize , Hash ) ]
7760struct UpdateStateAndDbOutput {
78- runner_workflow_id : Option < Id > ,
7961 allocated_serverless_slot : bool ,
8062}
8163
@@ -151,13 +133,11 @@ async fn update_state_and_db(
151133
152134 state. destroy_ts = Some ( destroy_ts) ;
153135 state. runner_id = None ;
154- let runner_workflow_id = state. runner_workflow_id . take ( ) ;
155136
156137 let old_allocated_serverless_slot = state. allocated_serverless_slot ;
157138 state. allocated_serverless_slot = false ;
158139
159140 Ok ( UpdateStateAndDbOutput {
160- runner_workflow_id,
161141 allocated_serverless_slot : old_allocated_serverless_slot,
162142 } )
163143}
0 commit comments