@@ -452,7 +452,7 @@ async fn enqueue_upload_tasks(
452452 db_txn : & mut Transaction < ' _ , Postgres > ,
453453 tasks : & [ HandleItem ] ,
454454) -> Result < ( ) , ExecutionError > {
455- for task in tasks. iter ( ) . filter ( |t| t. completed ( ) ) {
455+ for task in tasks. iter ( ) . filter ( |t| t. is_completed ( ) ) {
456456 task. enqueue_upload_task ( db_txn) . await ?;
457457 }
458458
@@ -559,7 +559,6 @@ fn compute_task(
559559 match squash_noise_with_guard ( & ct, enable_compression) {
560560 Ok ( bytes) => {
561561 telemetry:: end_span ( span) ;
562- task. status = TaskStatus :: Completed ;
563562
564563 info ! (
565564 handle = handle,
@@ -578,7 +577,7 @@ fn compute_task(
578577 } ;
579578
580579 task. ct128 = Arc :: new ( BigCiphertext :: new ( bytes, format) ) ;
581- task. set_status ( TaskStatus :: Completed ) ;
580+ task. status = TaskStatus :: Completed ;
582581
583582 // Start uploading the ciphertexts as soon as the ct128 is computed
584583 //
@@ -609,7 +608,7 @@ fn compute_task(
609608 }
610609 Err ( err) => {
611610 telemetry:: end_span_with_err ( span, err. to_string ( ) ) ;
612- task. set_status ( TaskStatus :: UnrecoverableErr ( err. to_string ( ) ) ) ;
611+ task. status = TaskStatus :: UnrecoverableErr ( err. to_string ( ) ) ;
613612 error ! ( { handle = handle, error = %err } , "Failed to convert ct" ) ;
614613 }
615614 } ;
@@ -682,7 +681,7 @@ async fn update_ciphertext128(
682681 // Worst-case scenario, the SnS-computation will be retried later.
683682 // However, if both DB insertion and S3 upload fail, this guarantees that the computation
684683 // will be retried and the ct128 uploaded.
685- task. set_status ( TaskStatus :: TransientErr ( err. to_string ( ) ) ) ;
684+ task. status = TaskStatus :: TransientErr ( err. to_string ( ) ) ;
686685 }
687686 }
688687
@@ -697,7 +696,7 @@ async fn update_computations_status(
697696 tasks : & [ HandleItem ] ,
698697) -> Result < ( ) , ExecutionError > {
699698 for task in tasks {
700- match task. status ( ) {
699+ match & task. status {
701700 TaskStatus :: Completed => {
702701 // Mark the computation as completed and clear transient error
703702 sqlx:: query!(
0 commit comments