Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Schedule async tasks using redis protocol. Redis/ValKey/Dragonfly or any broker using the redis protocol can be used.

License

NotificationsYou must be signed in to change notification settings

django-commons/django-tasks-scheduler

Django CIbadgebadge

Documentation can be found inhttps://django-tasks-scheduler.readthedocs.io/

Introduction Video

Django Tasks Scheduler Introduction

Watch this introduction video to learn about django-tasks-scheduler and its features.

Usage

  1. Updatesettings.py to include scheduler configuration:
importosfromtypingimportDictfromscheduler.typesimportSchedulerConfiguration,Broker,QueueConfigurationINSTALLED_APPS= [# ...'scheduler',# ...]SCHEDULER_CONFIG=SchedulerConfiguration(EXECUTIONS_IN_PAGE=20,SCHEDULER_INTERVAL=10,BROKER=Broker.REDIS,CALLBACK_TIMEOUT=60,# Callback timeout in seconds (success/failure/stopped)# Default values, can be overridden per task/jobDEFAULT_SUCCESS_TTL=10*60,# Time To Live (TTL) in seconds to keep successful job resultsDEFAULT_FAILURE_TTL=365*24*60*60,# Time To Live (TTL) in seconds to keep job failure informationDEFAULT_JOB_TTL=10*60,# Time To Live (TTL) in seconds to keep job informationDEFAULT_JOB_TIMEOUT=5*60,# timeout (seconds) for a job# General configuration valuesDEFAULT_WORKER_TTL=10*60,# Time To Live (TTL) in seconds to keep worker information after last heartbeatDEFAULT_MAINTENANCE_TASK_INTERVAL=10*60,# The interval to run maintenance tasks in seconds. 10 minutes.DEFAULT_JOB_MONITORING_INTERVAL=30,# The interval to monitor jobs in seconds.SCHEDULER_FALLBACK_PERIOD_SECS=120,# Period (secs) to wait before requiring to reacquire locks)SCHEDULER_QUEUES:Dict[str,QueueConfiguration]= {'default':QueueConfiguration(URL='redis://localhost:6379/0'),}
  1. Updateurls.py to include scheduler urls:
fromdjango.urlsimportpath,includeurlpatterns= [# ...path('scheduler/',include('scheduler.urls')),]
  1. Run migrations:
python manage.py migrate
  1. Check out the admin views:

Local development environment

You can installpre-commit hook in the repo to add it as a git hook byrunning:pre-commit install. It is configured to check all change files based on configuration in.pre-commit-config.yaml.

Sponsor

django-tasks-scheduler is developed for free.

You can support this project by becoming a sponsor usingthis link.

Contributing

Interested in contributing, providing suggestions, or submitting bugs? Seeguidelinesat this link.

About

Schedule async tasks using redis protocol. Redis/ValKey/Dragonfly or any broker using the redis protocol can be used.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors15


[8]ページ先頭

©2009-2025 Movatter.jp