15 lines
353 B
Python
15 lines
353 B
Python
from . import service
|
|
from rocketry import Rocketry
|
|
from rocketry.conds import daily
|
|
import datetime
|
|
from .db import database
|
|
|
|
app = Rocketry(execution="async")
|
|
|
|
# Create task:
|
|
@app.task('daily')
|
|
async def daily_check():
|
|
# Фильтруем по сроку годности
|
|
service.check_obsolete(database, current_date=datetime.date.today())
|
|
|