Skip to content

Commit

Permalink
fix(misc): logging;
Browse files Browse the repository at this point in the history
- Typo in logging.
  • Loading branch information
JVickery-TBS committed Dec 9, 2024
1 parent a535f80 commit 0ab5ef3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ckanext/xloader/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def tabulator_load():
except FileNotFoundError:
pass
timeout = config.get('ckanext.xloader.job_timeout', '3600')
logger.warning('Job time out after %ss', timeout)
logger.warning('Job timed out after %ss', timeout)
raise JobError('Job timed out after {}s'.format(timeout))
except FileCouldNotBeLoadedError as e:
logger.warning('Loading excerpt for this format not supported.')
Expand Down Expand Up @@ -390,7 +390,7 @@ def _download_resource_data(resource, data, api_key, logger):
except JobTimeoutException as e:
tmp_file.close()
timeout = config.get('ckanext.xloader.job_timeout', '3600')
logger.warning('Job time out after %ss', timeout)
logger.warning('Job timed out after %ss', timeout)
raise JobError('Job timed out after {}s'.format(timeout))

logger.info('Downloaded ok - %s', printable_file_size(length))
Expand Down
6 changes: 0 additions & 6 deletions ckanext/xloader/tests/test_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,6 @@ def test_data_with_rq_job_timeout(self, cli, data):
self.enqueue(jobs.xloader_data_into_datastore, [data], rq_kwargs=dict(timeout=15))
with mock.patch("ckanext.xloader.jobs.get_response", get_large_data_response):
stdout = cli.invoke(ckan, ["jobs", "worker", "--burst"]).output
print(' ')
print('DEBUGGING::')
print(' ')
print(stdout)
print(' ')
assert False
assert "Job timed out after" in stdout
for f in _get_temp_files():
# make sure that the tmp file has been closed/deleted in job timeout exception handling
Expand Down

0 comments on commit 0ab5ef3

Please sign in to comment.