Skip to content
This repository has been archived by the owner on Sep 4, 2023. It is now read-only.

Question #158

Open
alphatownsman opened this issue Jun 26, 2023 · 1 comment
Open

Question #158

alphatownsman opened this issue Jun 26, 2023 · 1 comment

Comments

@alphatownsman
Copy link

alphatownsman commented Jun 26, 2023

Hey, I ran into this nice project when researching alternative of run django scripts in cron, a few questions:

  • are you rebranding this to https://github.com/dsoftwareinc/django-tasks-scheduler ? (which makes sense but just to confirm here)
  • is the plan to continue use rq and be compatible with django-rq ?
  • also currently this seems to hit db every time reschedule in worker, which is great for consistency. However, given the fact that, for most apps, db are usually slower and busier than redis, would you consider further improvement or alternative to reduce the use of db (maybe only when worker initializing and user add/update/remove jobs)?
@cunla
Copy link
Collaborator

cunla commented Jun 29, 2023

Hi,

Apologies for the late response - it has been a hectic week. Answers inside.

Yes, but I'll keep maintaining both for now.

  • is the plan to continue use rq and be compatible with django-rq ?

in django-tasks-scheduler, rq dependency will be removed completely - eventually!
You can use django-rq + rq, but django-tasks-scheduler won't share the same queues and the jobs of django-rq won't be listed in django-tasks-scheduler.

  • also currently this seems to hit db every time reschedule in worker, which is great for consistency. However, given the fact that, for most apps, db are usually slower and busier than redis, would you consider further improvement or alternative to reduce the use of db (maybe only when worker initializing and user add/update/remove jobs)?

That's a good point and one of the reasons to separate from RQ.

Having scheduler as part of workers, I can't distinguish between "schedule from DB" and "schedule from queue".

There is a workaround for it which I can implement:

  • Create a setting variable (SCHEDULER_DB_INTERVAL)
  • Set up a variable in the scheduler key in redis for last DB sync
  • Run the DB sync based on the interval and last DB sync.

If you think this is valid, please open an issue in the django-tasks-scheduler for it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants