Skip to content

Commit

Permalink
Merge pull request #94 from qld-gov-au/develop
Browse files Browse the repository at this point in the history
Develop to master - handle potential deadlocks more gracefully
  • Loading branch information
ThrawnCA authored May 1, 2024
2 parents ad1361b + 310fc2b commit 047ba79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ckanext/xloader/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def xloader_data_into_datastore(input):
if tries < MAX_RETRIES:
tries = tries + 1
log.info("Job %s failed due to temporary error [%s], retrying", job_id, e)
logger.info("Job failed due to temporary error [%s], retrying", e)
job_dict['status'] = 'pending'
job_dict['metadata']['tries'] = tries
enqueue_job(
Expand Down
2 changes: 1 addition & 1 deletion ckanext/xloader/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def _clear_datastore_resource(resource_id):
'''
engine = get_write_engine()
with engine.begin() as conn:
conn.execute("SET LOCAL lock_timeout = '5s'")
conn.execute("SET LOCAL lock_timeout = '15s'")
conn.execute('TRUNCATE TABLE "{}" RESTART IDENTITY'.format(resource_id))


Expand Down

0 comments on commit 047ba79

Please sign in to comment.