mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-03-18 15:34:01 +01:00
22 lines
505 B
Python
22 lines
505 B
Python
import logging
|
|
|
|
from procrastinate.contrib.django import app
|
|
|
|
from apps.transactions.models import RecurringTransaction
|
|
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
@app.periodic(cron="0 0 * * *")
|
|
@app.task
|
|
def generate_recurring_transactions(timestamp=None):
|
|
try:
|
|
RecurringTransaction.generate_upcoming_transactions()
|
|
except Exception as e:
|
|
logger.error(
|
|
"Error while executing 'generate_recurring_transactions' task",
|
|
exc_info=True,
|
|
)
|
|
raise e
|