aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat/crossref_importer.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-09-14 15:02:52 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-09-14 15:06:47 -0700
commit61caceebcc5cd04b28d9859b27ac314bb2a59bbb (patch)
treeee70241ade0fb769e33b0312873826d243740282 /python/fatcat/crossref_importer.py
parentac0b49ee3e04d98ad5b6dd8c2360a71d7ecce1a3 (diff)
downloadfatcat-61caceebcc5cd04b28d9859b27ac314bb2a59bbb.tar.gz
fatcat-61caceebcc5cd04b28d9859b27ac314bb2a59bbb.zip
add insert counting to importers
Diffstat (limited to 'python/fatcat/crossref_importer.py')
-rw-r--r--python/fatcat/crossref_importer.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/fatcat/crossref_importer.py b/python/fatcat/crossref_importer.py
index a2e14ed1..2154c8c0 100644
--- a/python/fatcat/crossref_importer.py
+++ b/python/fatcat/crossref_importer.py
@@ -160,6 +160,7 @@ class FatcatCrossrefImporter(FatcatImporter):
re.container_id = container.ident
self._issnl_id_map[ce.issnl] = container.ident
self.api.create_release(re, editgroup=editgroup)
+ self.insert_count = self.insert_count + 1
def create_batch(self, batch, editgroup=None):
"""Current work/release pairing disallows batch creation of releases.
@@ -178,3 +179,4 @@ class FatcatCrossrefImporter(FatcatImporter):
self._issnl_id_map[ce.issnl] = container.ident
release_batch.append(re)
self.api.create_release_batch(release_batch, autoaccept="true", editgroup=editgroup)
+ self.insert_count = self.insert_count + len(release_batch)