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