Skip to content

Commit fdc29d9

Browse files
committed
probe
1 parent 84fe72b commit fdc29d9

3 files changed

Lines changed: 21 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ This project adheres to [Semantic Versioning].
77

88
## [Unreleased]
99

10+
## [0.0.39] - 2026-04-20
11+
12+
### Fixed in 0.0.39
13+
14+
- Long running record check in `sz_file_loader` could error on long running redo records
15+
1016
## [0.0.38] - 2026-04-16
1117

1218
### Added in 0.0.38

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "sz-python-tools"
3-
version = "0.0.38"
3+
version = "0.0.39"
44
description = "Senzing Python Tools"
55
authors = [{ name = "senzing", email = "support@senzing.com" }]
66
readme = "README.md"

sz_tools/sz_file_loader

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -776,12 +776,21 @@ def long_running_check(
776776
if duration > LONG_RECORD:
777777
num_stuck += 1
778778
stuck_record = _json_loads(payload[0])
779-
logger.warning(
780-
"Long running record (%s): %s - %s",
779+
stuck_data_source = stuck_record.get("DATA_SOURCE")
780+
stuck_record_id = stuck_record.get("RECORD_ID")
781+
if not stuck_data_source or not stuck_record_id:
782+
logger.warning(
783+
"Long running record (%s): %s",
781784
f"{duration / 60:.3g}",
782-
f"{stuck_record['DATA_SOURCE']}",
783-
f"{stuck_record['RECORD_ID']}",
784-
)
785+
stuck_record,
786+
)
787+
else:
788+
logger.warning(
789+
"Long running record (%s): %s - %s",
790+
f"{duration / 60:.3g}",
791+
stuck_data_source,
792+
stuck_record_id
793+
)
785794

786795
if num_stuck >= num_workers:
787796
logger.warning("All %s threads are stuck processing long running records", num_workers)

0 commit comments

Comments
 (0)