build: bump RQ to 2.x (#31141)
* build: bump RQ to 2.x * fix: dont use colon for job IDs
This commit is contained in:
parent
c038c16bee
commit
aa71072d4a
4 changed files with 5 additions and 4 deletions
|
|
@ -105,7 +105,7 @@ class DataImport(Document):
|
|||
if is_scheduler_inactive() and not run_now:
|
||||
frappe.throw(_("Scheduler is inactive. Cannot import data."), title=_("Scheduler Inactive"))
|
||||
|
||||
job_id = f"data_import::{self.name}"
|
||||
job_id = f"data_import||{self.name}"
|
||||
|
||||
if not is_job_enqueued(job_id):
|
||||
enqueue(
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class ScheduledJobType(Document):
|
|||
@property
|
||||
def rq_job_id(self):
|
||||
"""Unique ID created to deduplicate jobs with single RQ call."""
|
||||
return f"scheduled_job::{self.name}"
|
||||
return f"scheduled_job||{self.name}"
|
||||
|
||||
@property
|
||||
def next_execution(self):
|
||||
|
|
|
|||
|
|
@ -327,6 +327,7 @@ def start_worker(
|
|||
date_format="%Y-%m-%d %H:%M:%S",
|
||||
log_format="%(asctime)s,%(msecs)03d %(message)s",
|
||||
dequeue_strategy=strategy,
|
||||
with_scheduler=False,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -611,7 +612,7 @@ def create_job_id(job_id: str | None = None) -> str:
|
|||
|
||||
if not job_id:
|
||||
job_id = str(uuid4())
|
||||
return f"{frappe.local.site}::{job_id}"
|
||||
return f"{frappe.local.site}||{job_id}"
|
||||
|
||||
|
||||
def is_job_enqueued(job_id: str) -> bool:
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ dependencies = [
|
|||
# We depend on internal attributes of RQ.
|
||||
# Do NOT add loose requirements on RQ versions.
|
||||
# Audit the code changes w.r.t. background_jobs.py before updating.
|
||||
"rq==1.16.2",
|
||||
"rq==2.1.0",
|
||||
"rsa>=4.1",
|
||||
"semantic-version~=2.10.0",
|
||||
"sentry-sdk~=1.37.1",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue