generated from john/python-template
Co-authored-by: Copilot App <[email protected]>
This commit is contained in:
co-authored by
Copilot App
parent
26f9c83f54
commit
736d0c06f4
@@ -26,6 +26,7 @@ extend-select = [
|
|||||||
"E", "W", # https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
|
"E", "W", # https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
|
||||||
"F", # https://docs.astral.sh/ruff/rules/#pyflakes-f
|
"F", # https://docs.astral.sh/ruff/rules/#pyflakes-f
|
||||||
"FURB", # https://docs.astral.sh/ruff/rules/#refurb-furb
|
"FURB", # https://docs.astral.sh/ruff/rules/#refurb-furb
|
||||||
|
"G", # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
|
||||||
"I", # https://docs.astral.sh/ruff/rules/#isort-i
|
"I", # https://docs.astral.sh/ruff/rules/#isort-i
|
||||||
"N", # https://docs.astral.sh/ruff/rules/#pep8-naming-n
|
"N", # https://docs.astral.sh/ruff/rules/#pep8-naming-n
|
||||||
"PD", # https://docs.astral.sh/ruff/rules/#pandas-vet-pd
|
"PD", # https://docs.astral.sh/ruff/rules/#pandas-vet-pd
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ async def advance_job(
|
|||||||
session=session,
|
session=session,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
logger.error(f"Job {job.id} has failed and reached max retries.")
|
logger.error("Job %s has failed and reached max retries.", job.id)
|
||||||
return
|
return
|
||||||
case _:
|
case _:
|
||||||
return
|
return
|
||||||
@@ -207,7 +207,7 @@ async def process_queued_job( # noqa: PLR0915
|
|||||||
runtime_settings = settings or get_settings()
|
runtime_settings = settings or get_settings()
|
||||||
current_status = _coerce_job_status(job.status)
|
current_status = _coerce_job_status(job.status)
|
||||||
if current_status not in {JobStatus.QUEUED, JobStatus.PROCESSING}:
|
if current_status not in {JobStatus.QUEUED, JobStatus.PROCESSING}:
|
||||||
logger.warning(f"Job {job.id} is not queued. Current status: {job.status}")
|
logger.warning("Job %s is not queued. Current status: %s", job.id, job.status)
|
||||||
return
|
return
|
||||||
|
|
||||||
# Transaction A: claim job for processing. Reached only when a caller hands us a
|
# Transaction A: claim job for processing. Reached only when a caller hands us a
|
||||||
|
|||||||
Reference in New Issue
Block a user