11#![ allow( non_local_definitions) ] // pymethods annotations causing issues with this lint
22
33use anyhow:: Context ;
4- use log:: error;
54use prost:: Message ;
65use pyo3:: exceptions:: { PyException , PyRuntimeError , PyValueError } ;
76use pyo3:: prelude:: * ;
@@ -24,6 +23,7 @@ use temporal_sdk_core_protos::coresdk::{ActivityHeartbeat, ActivityTaskCompletio
2423use temporal_sdk_core_protos:: temporal:: api:: history:: v1:: History ;
2524use tokio:: sync:: mpsc:: { channel, Sender } ;
2625use tokio_stream:: wrappers:: ReceiverStream ;
26+ use tracing:: error;
2727
2828use crate :: client;
2929use crate :: runtime;
@@ -366,9 +366,7 @@ impl<SK: SlotKind + Send + Sync> SlotSupplierTrait for CustomSlotSupplierOfType<
366366 } ) {
367367 Ok ( f) => f,
368368 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}" ) ;
372370 continue ;
373371 }
374372 }
@@ -401,9 +399,7 @@ impl<SK: SlotKind + Send + Sync> SlotSupplierTrait for CustomSlotSupplierOfType<
401399 ) ) )
402400 } )
403401 . 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}" ) ;
407403 None
408404 } )
409405 }
@@ -425,9 +421,7 @@ impl<SK: SlotKind + Send + Sync> SlotSupplierTrait for CustomSlotSupplierOfType<
425421 ) ?;
426422 PyResult :: Ok ( ( ) )
427423 } ) {
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}" ) ;
431425 }
432426 }
433427
@@ -447,9 +441,7 @@ impl<SK: SlotKind + Send + Sync> SlotSupplierTrait for CustomSlotSupplierOfType<
447441 py_obj. call_method1 ( "release_slot" , ( SlotReleaseCtx { slot_info, permit } , ) ) ?;
448442 PyResult :: Ok ( ( ) )
449443 } ) {
450- error ! (
451- "Uncaught error in custom slot supplier `release_slot`: {e}"
452- ) ;
444+ error ! ( "Uncaught error in custom slot supplier `release_slot`: {e}" ) ;
453445 }
454446 }
455447
0 commit comments