File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1104,10 +1104,11 @@ def process(
1104
1104
kwargs ["extra" ] = extra
1105
1105
return (msg , kwargs )
1106
1106
1107
- def log (self , * args , ** kwargs ) -> None :
1107
+ def isEnabledFor (self , level : int ) -> bool :
1108
1108
"""Override to ignore replay logs."""
1109
- if self .log_during_replay or not unsafe .is_replaying ():
1110
- super ().log (* args , ** kwargs )
1109
+ if not self .log_during_replay and unsafe .is_replaying ():
1110
+ return False
1111
+ return super ().isEnabledFor (level )
1111
1112
1112
1113
@property
1113
1114
def base_logger (self ) -> logging .Logger :
Original file line number Diff line number Diff line change @@ -1907,11 +1907,12 @@ def find_log(starts_with: str) -> Optional[logging.LogRecord]:
1907
1907
assert find_log ("Signal: signal 1 ({'attempt':" )
1908
1908
assert find_log ("Signal: signal 2" )
1909
1909
assert not find_log ("Signal: signal 3" )
1910
- # Also make sure it has some workflow info
1910
+ # Also make sure it has some workflow info and correct funcName
1911
1911
record = find_log ("Signal: signal 1" )
1912
1912
assert (
1913
1913
record
1914
1914
and record .__dict__ ["workflow_info" ].workflow_type == "LoggingWorkflow"
1915
+ and record .funcName == "my_signal"
1915
1916
)
1916
1917
1917
1918
# Clear queue and start a new one with more signals
You can’t perform that action at this time.
0 commit comments