Multiple schedulers with same RedisJobStore #915
duy-nguyen-ts
started this conversation in
General
Replies: 1 comment 2 replies
-
Have you read the FAQ? Job store sharing does not work on 3.x, but does on 4.0/master. Sadly it turns out Redis did not have sophisticated enough querying capabilities so it was dropped as a store in 4.0. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone, I have this case and I want to know exactly how apscheduler handle it
Prepare
version 3.10.4
AsyncIOScheduler()
test_job(name: str)
Do
A = AsyncIOScheduler()
andB = AsyncIOScheduler()
A.add_jobstore(RedisJobStore())
andB.add_jobstore(RedisJobStore())
A.start()
andB.start()
A.add_job(func=test_job, trigger='date', kwargs={"name": "AAA"}, run_date=t, id="same_id", replace_existing=True)
B.add_job(func=test_job, trigger='date', kwargs={"name": "BBB"}, run_date=t+5, id="same_id", replace_existing=True)
Result
t+5
? => I have tested and the job ran only one time withname = BBB
test_job
sometime run by scheduler A and sometime by scheduler B==> So I want to know if I add a job with same ID and same job_store between multiple instance. Is that job always run only one time with the latest
kwargs
?Beta Was this translation helpful? Give feedback.
All reactions