mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
adf091fa07
* fix: email-template design * fix: priority and state new value * dev: update template with comments, cta text and view issue button. * dev: fix priority and state * dev: update data condition * fix: added avatar url * fix: comment avatar url * fix: priority, labels, state design * style: assignee property * dev: fix template for comments and profile changes * fix: spacing between properties * fix: todo image for state change * fix: blocking and blocked by value change * dev: update template summsary * fix: blocking, duplicate * fix: comments spacing * chore: improve `state change` checkbox logic. * fix: email notification message change * fix: updated date format * fix: updates text color * fix: labels sequence rendering * fix: schedular time change --------- Co-authored-by: LAKHAN BAHETI <lakhanbaheti9@gmail.com> Co-authored-by: pablohashescobar <nikhilschacko@gmail.com> Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
42 lines
1.4 KiB
Python
42 lines
1.4 KiB
Python
import os
|
|
from celery import Celery
|
|
from plane.settings.redis import redis_instance
|
|
from celery.schedules import crontab
|
|
from django.utils.timezone import timedelta
|
|
|
|
# Set the default Django settings module for the 'celery' program.
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "plane.settings.production")
|
|
|
|
ri = redis_instance()
|
|
|
|
app = Celery("plane")
|
|
|
|
# Using a string here means the worker will not have to
|
|
# pickle the object when using Windows.
|
|
app.config_from_object("django.conf:settings", namespace="CELERY")
|
|
|
|
app.conf.beat_schedule = {
|
|
# Executes every day at 12 AM
|
|
"check-every-day-to-archive-and-close": {
|
|
"task": "plane.bgtasks.issue_automation_task.archive_and_close_old_issues",
|
|
"schedule": crontab(hour=0, minute=0),
|
|
},
|
|
"check-every-day-to-delete_exporter_history": {
|
|
"task": "plane.bgtasks.exporter_expired_task.delete_old_s3_link",
|
|
"schedule": crontab(hour=0, minute=0),
|
|
},
|
|
"check-every-day-to-delete-file-asset": {
|
|
"task": "plane.bgtasks.file_asset_task.delete_file_asset",
|
|
"schedule": crontab(hour=0, minute=0),
|
|
},
|
|
"check-every-five-minutes-to-send-email-notifications": {
|
|
"task": "plane.bgtasks.email_notification_task.stack_email_notification",
|
|
"schedule": crontab(minute='*/5')
|
|
},
|
|
}
|
|
|
|
# Load task modules from all registered Django app configs.
|
|
app.autodiscover_tasks()
|
|
|
|
app.conf.beat_scheduler = "django_celery_beat.schedulers.DatabaseScheduler"
|