Skip to content

Commit 732b435

Browse files
authored
Issue 8.ant.1 (#9)
* Issue #8 - docs & new api examples * Update README.md #8 * Update CHANGELOG.md #8
1 parent c20e925 commit 732b435

File tree

5 files changed

+61
-4
lines changed

5 files changed

+61
-4
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
[markdownlint](https://dlaa.me/markdownlint/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [1.0.1] - 2023-01-18
10+
11+
### Added to 1.0.1
12+
13+
- Add additional API redo examples
14+
- Update documentation
15+
916
## [1.0.0] - 2022-12-22
1017

1118
### Added to 1.0.0

Python/APIs/G2Engine/Redo/getRedoRecord.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
g2_engine.getRedoRecord(redo_record)
1414

1515
if redo_record:
16-
print(redo_record.decode())
16+
g2_engine.process(redo_record.decode())
1717
else:
1818
print('No redo records currently available.')
1919

Python/APIs/G2Engine/Redo/process.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#! /usr/bin/env python3
2+
3+
import os
4+
import sys
5+
from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException
6+
7+
engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None)
8+
redo_record = bytearray()
9+
10+
try:
11+
g2_engine = G2Engine()
12+
g2_engine.init('G2Engine', engine_config_json, False)
13+
g2_engine.getRedoRecord(redo_record)
14+
15+
if redo_record:
16+
g2_engine.process(redo_record.decode())
17+
else:
18+
print('No redo records currently available.')
19+
20+
g2_engine.destroy()
21+
except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex:
22+
print(ex)
23+
sys.exit(-1)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#! /usr/bin/env python3
2+
3+
import os
4+
import sys
5+
from senzing import G2BadInputException, G2Engine, G2Exception, G2RetryableException, G2UnrecoverableException
6+
7+
engine_config_json = os.getenv('SENZING_ENGINE_CONFIGURATION_JSON', None)
8+
redo_record = bytearray()
9+
with_info = bytearray()
10+
11+
try:
12+
g2_engine = G2Engine()
13+
g2_engine.init('G2Engine', engine_config_json, False)
14+
g2_engine.getRedoRecord(redo_record)
15+
16+
if redo_record:
17+
g2_engine.processWithInfo(redo_record.decode(), with_info)
18+
print(with_info.decode())
19+
else:
20+
print('No redo records currently available.')
21+
22+
g2_engine.destroy()
23+
except (G2BadInputException, G2RetryableException, G2UnrecoverableException, G2Exception) as ex:
24+
print(ex)
25+
sys.exit(-1)

Python/Tasks/Redo/README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ When an entity requires additional work a record is automatically created in the
1818
* Collect the response from the [with info](../../../README.md#with-info) version of the API and write it to a file
1919

2020
## API Calls
21-
* [processRedoRecord](../../../Python/APIs/G2Engine/Redo/processRedoRecord.py)
22-
* Retrieve and process a single redo record.
23-
* [processRedoRecordWithInfo](../../../Python/APIs/G2Engine/Redo/processRedoRecordWithInfo.py)
21+
* [getRedoRecord](../../../Python/APIs/G2Engine/Redo/getRedoRecord.py)
22+
* Retrieve a single redo record for processing
23+
* [process](../../../Python/APIs/G2Engine/Redo/process.py)
24+
* Process a single redo record
25+
* [processWithInfo](../../../Python/APIs/G2Engine/Redo/processWithInfo.py)
2426
* Process a single redo record and returns information outlining any entities affected by the processing of the record. For further information see [With Info](../../../README.md#with-info)

0 commit comments

Comments
 (0)