Skip to content

Commit 616386f

Browse files
committed
redoer update
1 parent 76b6b06 commit 616386f

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Dockerfile.redoer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN apt-get update \
77
&& apt-get -y autoremove \
88
&& apt-get -y clean
99

10-
RUN pip3 install --break-system-packages opentelemetry-distro opentelemetry-exporter-otlp-proto-http
10+
RUN pip3 install --break-system-packages opentelemetry-distro opentelemetry-exporter-otlp-proto-http psycopg2-binary
1111
# Above, `--break-system-packages` flag overrides the
1212
# "This environment is externally managed" error that calling pip
1313
# would otherwise incur here.

dev-scripts/check_export_tracker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@
4646

4747
if len(sys.argv) == 2 and sys.argv[1] == 'dump':
4848
print(rslt)
49+
print(f'Total: {len(rslt)}')

middleware/redoer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from opentelemetry import metrics
1515

1616
import util
17+
import db
1718

1819
try:
1920
log.info('Importing senzing_core library . . .')
@@ -108,10 +109,12 @@ def _otel_queue_count_steward(tally):
108109
have_rcd = 0
109110
log.debug(SZ_TAG + 'Successfully redid one record via process_redo_record().')
110111

111-
# TODO send affected entity IDs to tracker
112+
# Save affected entity IDs to tracker table for exporting later.
112113
affected = util.parse_affected_entities_resp(resp)
114+
for entity_id in affected: db.add_entity_id(entity_id)
113115

114116
continue
117+
115118
except sz.SzRetryableError as sz_ret_err:
116119
# We'll try to process this record again.
117120
log.error(SZ_TAG + fmterr(sz_ret_err))

0 commit comments

Comments
 (0)