@@ -643,7 +643,7 @@ impl Engine {
643
643
async fn execute_workflow (
644
644
& self ,
645
645
workflow_run_id : Uuid ,
646
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
646
+ progress_callback : Option < ProgressCallback > ,
647
647
) -> Result < ( ) > {
648
648
// Get the workflow run
649
649
let workflow_run = self
@@ -939,7 +939,7 @@ impl Engine {
939
939
async fn execute_task (
940
940
& self ,
941
941
task_id : Uuid ,
942
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
942
+ progress_callback : Option < ProgressCallback > ,
943
943
) -> Result < ( ) > {
944
944
let task = self . state_adapter . lock ( ) . await . get_task ( task_id) . await ?;
945
945
@@ -1157,7 +1157,7 @@ impl Engine {
1157
1157
state : & HashMap < String , serde_json:: Value > ,
1158
1158
workflow : & Workflow ,
1159
1159
bundle_path : & Option < PathBuf > ,
1160
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
1160
+ progress_callback : Option < ProgressCallback > ,
1161
1161
) -> Result < ( ) > {
1162
1162
self . execute_step_action_with_chain (
1163
1163
runner,
@@ -1189,7 +1189,7 @@ impl Engine {
1189
1189
workflow : & Workflow ,
1190
1190
bundle_path : & Option < PathBuf > ,
1191
1191
dependency_chain : & [ CodemodDependency ] ,
1192
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
1192
+ progress_callback : Option < ProgressCallback > ,
1193
1193
) -> Result < ( ) > {
1194
1194
match action {
1195
1195
StepAction :: RunScript ( run) => {
@@ -1274,7 +1274,7 @@ impl Engine {
1274
1274
& self ,
1275
1275
ast_grep : & UseAstGrep ,
1276
1276
bundle_path : Option < & std:: path:: Path > ,
1277
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
1277
+ progress_callback : Option < ProgressCallback > ,
1278
1278
) -> Result < ( ) > {
1279
1279
// Use bundle path as working directory, falling back to current directory
1280
1280
let working_dir = bundle_path
@@ -1366,7 +1366,7 @@ impl Engine {
1366
1366
& self ,
1367
1367
js_ast_grep : & UseJSAstGrep ,
1368
1368
bundle_path : Option < & std:: path:: Path > ,
1369
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
1369
+ progress_callback : Option < ProgressCallback > ,
1370
1370
) -> Result < ( ) > {
1371
1371
// Use bundle path as working directory, falling back to current directory
1372
1372
let working_dir = bundle_path
@@ -1502,7 +1502,7 @@ impl Engine {
1502
1502
state : & HashMap < String , serde_json:: Value > ,
1503
1503
bundle_path : & Option < PathBuf > ,
1504
1504
dependency_chain : & [ CodemodDependency ] ,
1505
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
1505
+ progress_callback : Option < ProgressCallback > ,
1506
1506
) -> Result < ( ) > {
1507
1507
info ! ( "Executing codemod step: {}" , codemod. source) ;
1508
1508
@@ -1594,7 +1594,7 @@ impl Engine {
1594
1594
state : & HashMap < String , serde_json:: Value > ,
1595
1595
bundle_path : & Option < PathBuf > ,
1596
1596
dependency_chain : & [ CodemodDependency ] ,
1597
- progress_callback : Option < Arc < Box < dyn Fn ( u64 , u64 ) + Send + Sync > > > ,
1597
+ progress_callback : Option < ProgressCallback > ,
1598
1598
) -> Result < ( ) > {
1599
1599
let workflow_path = resolved_package. package_dir . join ( "workflow.yaml" ) ;
1600
1600
0 commit comments