Skip to content

Commit

Permalink
Fixing a small bug in the queuing mechanism
Browse files Browse the repository at this point in the history
Fixing a small bug in the queuing mechanism
  • Loading branch information
rushirajnenuji committed Jul 28, 2020
1 parent 7bd4e31 commit c8467ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/d1_metrics/d1_metrics/metricsdatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,9 +762,9 @@ def queueCitationRequest(self, request_object):
if "citation_source" in request_object:
citation_source = request_object["citation_source"]

sql = "INSERT INTO citations_registration_queue (id, request, receive_timestamp, citation_source, ingest_attempts) VALUES ( DEFAULT, '"
sql = "INSERT INTO citations_registration_queue (id, request, citation_source, receive_timestamp, ingest_attempts) VALUES ( DEFAULT, '"
try:
csr.execute(sql + (json.dumps(request_object)).replace("'", r"''") + "','" + citation_source.replace("'", r"''") + str(datetime.now()) + "',0);" )
csr.execute(sql + (json.dumps(request_object)).replace("'", r"''") + "','" + citation_source.replace("'", r"''") + "','" + str(datetime.now()) + "',0);" )

except psycopg2.DatabaseError as e:
self._L.exception('Database error!\n{0}')
Expand Down

0 comments on commit c8467ea

Please sign in to comment.