From 832a9e42bc068c1b1656526b4a2cb7108c9b8334 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 18 Feb 2020 16:42:36 -0800 Subject: include rel and oa_status in ingest request 'extra' --- python/sandcrawler/db.py | 2 +- python/sandcrawler/persist.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/sandcrawler/db.py b/python/sandcrawler/db.py index ddb71a0..673912c 100644 --- a/python/sandcrawler/db.py +++ b/python/sandcrawler/db.py @@ -248,7 +248,7 @@ class SandcrawlerPostgresClient: for r in batch: # in case these fields were already packed into 'request' extra = r.get('request', {}) - for k in ('ext_ids', 'fatcat_release', 'edit_extra'): + for k in ('ext_ids', 'fatcat_release', 'edit_extra', 'rel'): if r.get(k): extra[k] = r[k] if extra: diff --git a/python/sandcrawler/persist.py b/python/sandcrawler/persist.py index bfd8247..3f2762a 100644 --- a/python/sandcrawler/persist.py +++ b/python/sandcrawler/persist.py @@ -110,7 +110,7 @@ class PersistIngestFileResultWorker(SandcrawlerWorker): request['release_stage'] = raw['release_stage'] if raw.get('fatcat', {}).get('release_ident'): request['request']['release_ident'] = raw['fatcat']['release_ident'] - for k in ('ext_ids', 'edit_extra'): + for k in ('ext_ids', 'edit_extra', 'rel'): if raw.get(k): request['request'][k] = raw[k] # if this dict is empty, trim it to save DB space -- cgit v1.2.3