@@ -651,7 +651,7 @@ impl Engine {
651
651
async fn execute_workflow (
652
652
& self ,
653
653
workflow_run_id : Uuid ,
654
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
654
+ progress_callback : Option < ProgressCallback > ,
655
655
) -> Result < ( ) > {
656
656
// Get the workflow run
657
657
let workflow_run = self
@@ -947,7 +947,7 @@ impl Engine {
947
947
async fn execute_task (
948
948
& self ,
949
949
task_id : Uuid ,
950
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
950
+ progress_callback : Option < ProgressCallback > ,
951
951
) -> Result < ( ) > {
952
952
let task = self . state_adapter . lock ( ) . await . get_task ( task_id) . await ?;
953
953
@@ -1165,7 +1165,7 @@ impl Engine {
1165
1165
state : & HashMap < String , serde_json:: Value > ,
1166
1166
workflow : & Workflow ,
1167
1167
bundle_path : & Option < PathBuf > ,
1168
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
1168
+ progress_callback : Option < ProgressCallback > ,
1169
1169
) -> Result < ( ) > {
1170
1170
self . execute_step_action_with_chain (
1171
1171
runner,
@@ -1197,7 +1197,7 @@ impl Engine {
1197
1197
workflow : & Workflow ,
1198
1198
bundle_path : & Option < PathBuf > ,
1199
1199
dependency_chain : & [ CodemodDependency ] ,
1200
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
1200
+ progress_callback : Option < ProgressCallback > ,
1201
1201
) -> Result < ( ) > {
1202
1202
match action {
1203
1203
StepAction :: RunScript ( run) => {
@@ -1282,7 +1282,7 @@ impl Engine {
1282
1282
& self ,
1283
1283
ast_grep : & UseAstGrep ,
1284
1284
bundle_path : Option < & std:: path:: Path > ,
1285
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
1285
+ progress_callback : Option < ProgressCallback > ,
1286
1286
) -> Result < ( ) > {
1287
1287
// Use bundle path as working directory, falling back to current directory
1288
1288
let working_dir = bundle_path
@@ -1374,7 +1374,7 @@ impl Engine {
1374
1374
& self ,
1375
1375
js_ast_grep : & UseJSAstGrep ,
1376
1376
bundle_path : Option < & std:: path:: Path > ,
1377
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
1377
+ progress_callback : Option < ProgressCallback > ,
1378
1378
) -> Result < ( ) > {
1379
1379
// Use bundle path as working directory, falling back to current directory
1380
1380
let working_dir = bundle_path
@@ -1525,7 +1525,7 @@ impl Engine {
1525
1525
state : & HashMap < String , serde_json:: Value > ,
1526
1526
bundle_path : & Option < PathBuf > ,
1527
1527
dependency_chain : & [ CodemodDependency ] ,
1528
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
1528
+ progress_callback : Option < ProgressCallback > ,
1529
1529
) -> Result < ( ) > {
1530
1530
info ! ( "Executing codemod step: {}" , codemod. source) ;
1531
1531
@@ -1617,7 +1617,7 @@ impl Engine {
1617
1617
state : & HashMap < String , serde_json:: Value > ,
1618
1618
bundle_path : & Option < PathBuf > ,
1619
1619
dependency_chain : & [ CodemodDependency ] ,
1620
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
1620
+ progress_callback : Option < ProgressCallback > ,
1621
1621
) -> Result < ( ) > {
1622
1622
let workflow_path = resolved_package. package_dir . join ( "workflow.yaml" ) ;
1623
1623
0 commit comments