fix
This commit is contained in:
parent
c2d509dcfa
commit
6a2b76c228
@ -480,7 +480,7 @@
|
|||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"@app.get(\"/cron/08\", response_model=dict)\n",
|
"@app.get(\"/cron/08\", response_model=dict)\n",
|
||||||
"async def cron_08():\n",
|
"async def cron_08(background_tasks: BackgroundTasks):\n",
|
||||||
" async for doc in posts_collection.find({\n",
|
" async for doc in posts_collection.find({\n",
|
||||||
" '_id': {'$gte': ObjectId.from_datetime(datetime.now() - timedelta(days=1))},\n",
|
" '_id': {'$gte': ObjectId.from_datetime(datetime.now() - timedelta(days=1))},\n",
|
||||||
" '$or':[{'vk':[]},{'tg':[]},{'fb':[]},{'inst':[]},{'max':[]}]\n",
|
" '$or':[{'vk':[]},{'tg':[]},{'fb':[]},{'inst':[]},{'max':[]}]\n",
|
||||||
|
|||||||
2
main.py
2
main.py
@ -303,7 +303,7 @@ async def posts_temp(user,request):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@app.get("/cron/08", response_model=dict)
|
@app.get("/cron/08", response_model=dict)
|
||||||
async def cron_08():
|
async def cron_08(background_tasks: BackgroundTasks):
|
||||||
async for doc in posts_collection.find({
|
async for doc in posts_collection.find({
|
||||||
'_id': {'$gte': ObjectId.from_datetime(datetime.now() - timedelta(days=1))},
|
'_id': {'$gte': ObjectId.from_datetime(datetime.now() - timedelta(days=1))},
|
||||||
'$or':[{'vk':[]},{'tg':[]},{'fb':[]},{'inst':[]},{'max':[]}]
|
'$or':[{'vk':[]},{'tg':[]},{'fb':[]},{'inst':[]},{'max':[]}]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user