File: //home/arjun/projects/buyercall_forms/buyercall/buyercall/blueprints/activity/tasks.py
from flask import current_app
import logging as log
from buyercall.app import create_celery_app
from buyercall.extensions import db
from buyercall.blueprints.activity.models import ActivityLogs
celery = create_celery_app(current_app)
@celery.task()
def delete_old_activity_logs(**kwargs):
"""
Removes activity logs aged 6 months and older.
:return: Number of records removed.
"""
return ActivityLogs.delete_old_activity_logs()