Skip to content

Commit

Permalink
Log SOLR/metrics output
Browse files Browse the repository at this point in the history
  • Loading branch information
romanchyla committed Sep 26, 2017
1 parent c6d3fe2 commit b4f47ca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions adsmp/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,15 @@ def task_index_records(bibcodes, force=False, update_solr=True, update_metrics=T

# build the solr record
if update_solr:
batch.append(solr_updater.transform_json_record(r))
d = solr_updater.transform_json_record(r)
logger.debug('Built SOLR: %s', d)
batch.append(d)
# get data for metrics
if update_metrics:
m = r.get('metrics', None)
if m:
m['bibcode'] = bibcode
m['bibcode'] = bibcode
logger.debug('Got metrics: %s', m)
if r.get('processed'):
batch_update.append(m)
else:
Expand Down

0 comments on commit b4f47ca

Please sign in to comment.