datastream: optimize memory usage on ORCID sync #1677
Annotations
4 errors
Python / Tests (3.9, postgresql14, opensearch2):
invenio_vocabularies/contrib/names/datastreams.py#L1
Black format check
--- /home/runner/work/invenio-vocabularies/invenio-vocabularies/invenio_vocabularies/contrib/names/datastreams.py 2024-11-27 09:54:48.253792+00:00
+++ /home/runner/work/invenio-vocabularies/invenio-vocabularies/invenio_vocabularies/contrib/names/datastreams.py 2024-11-27 10:00:20.067592+00:00
@@ -69,11 +69,11 @@
time_shift = current_app.config["VOCABULARIES_ORCID_SYNC_SINCE"]
if self.since:
time_shift = self.since
last_sync = arrow.now() - timedelta(**time_shift)
try:
- content = io.TextIOWrapper(fileobj, encoding='utf-8')
+ content = io.TextIOWrapper(fileobj, encoding="utf-8")
csv_reader = csv.DictReader(content)
for row in csv_reader: # Skip the header line
orcid = row["orcid"]
|
Python / Tests (3.9, postgresql14, opensearch2)
Process completed with exit code 1.
|
Python / Tests (3.12, postgresql14, opensearch2):
invenio_vocabularies/contrib/names/datastreams.py#L1
Black format check
--- /home/runner/work/invenio-vocabularies/invenio-vocabularies/invenio_vocabularies/contrib/names/datastreams.py 2024-11-27 09:54:47.469283+00:00
+++ /home/runner/work/invenio-vocabularies/invenio-vocabularies/invenio_vocabularies/contrib/names/datastreams.py 2024-11-27 10:00:45.889480+00:00
@@ -69,11 +69,11 @@
time_shift = current_app.config["VOCABULARIES_ORCID_SYNC_SINCE"]
if self.since:
time_shift = self.since
last_sync = arrow.now() - timedelta(**time_shift)
try:
- content = io.TextIOWrapper(fileobj, encoding='utf-8')
+ content = io.TextIOWrapper(fileobj, encoding="utf-8")
csv_reader = csv.DictReader(content)
for row in csv_reader: # Skip the header line
orcid = row["orcid"]
|
Python / Tests (3.12, postgresql14, opensearch2)
Process completed with exit code 1.
|