1
1
#![ allow( non_local_definitions) ] // pymethods annotations causing issues with this lint
2
2
3
3
use anyhow:: Context ;
4
- use log:: error;
5
4
use prost:: Message ;
6
5
use pyo3:: exceptions:: { PyException , PyRuntimeError , PyValueError } ;
7
6
use pyo3:: prelude:: * ;
@@ -24,6 +23,7 @@ use temporal_sdk_core_protos::coresdk::{ActivityHeartbeat, ActivityTaskCompletio
24
23
use temporal_sdk_core_protos:: temporal:: api:: history:: v1:: History ;
25
24
use tokio:: sync:: mpsc:: { channel, Sender } ;
26
25
use tokio_stream:: wrappers:: ReceiverStream ;
26
+ use tracing:: error;
27
27
28
28
use crate :: client;
29
29
use crate :: runtime;
@@ -366,9 +366,7 @@ impl<SK: SlotKind + Send + Sync> SlotSupplierTrait for CustomSlotSupplierOfType<
366
366
} ) {
367
367
Ok ( f) => f,
368
368
Err ( e) => {
369
- error ! (
370
- "Unexpected error in custom slot supplier `reserve_slot`: {e}"
371
- ) ;
369
+ error ! ( "Unexpected error in custom slot supplier `reserve_slot`: {e}" ) ;
372
370
continue ;
373
371
}
374
372
}
@@ -401,9 +399,7 @@ impl<SK: SlotKind + Send + Sync> SlotSupplierTrait for CustomSlotSupplierOfType<
401
399
) ) )
402
400
} )
403
401
. unwrap_or_else ( |e| {
404
- error ! (
405
- "Uncaught error in custom slot supplier `try_reserve_slot`: {e}"
406
- ) ;
402
+ error ! ( "Uncaught error in custom slot supplier `try_reserve_slot`: {e}" ) ;
407
403
None
408
404
} )
409
405
}
@@ -425,9 +421,7 @@ impl<SK: SlotKind + Send + Sync> SlotSupplierTrait for CustomSlotSupplierOfType<
425
421
) ?;
426
422
PyResult :: Ok ( ( ) )
427
423
} ) {
428
- error ! (
429
- "Uncaught error in custom slot supplier `mark_slot_used`: {e}"
430
- ) ;
424
+ error ! ( "Uncaught error in custom slot supplier `mark_slot_used`: {e}" ) ;
431
425
}
432
426
}
433
427
@@ -447,9 +441,7 @@ impl<SK: SlotKind + Send + Sync> SlotSupplierTrait for CustomSlotSupplierOfType<
447
441
py_obj. call_method1 ( "release_slot" , ( SlotReleaseCtx { slot_info, permit } , ) ) ?;
448
442
PyResult :: Ok ( ( ) )
449
443
} ) {
450
- error ! (
451
- "Uncaught error in custom slot supplier `release_slot`: {e}"
452
- ) ;
444
+ error ! ( "Uncaught error in custom slot supplier `release_slot`: {e}" ) ;
453
445
}
454
446
}
455
447
0 commit comments