notify and fetch
This commit is contained in:
parent
2eadeaaabc
commit
66bb604b48
@ -61,7 +61,7 @@ def fetch_schedule_for_user(user_hse_id: int):
|
||||
|
||||
|
||||
def process():
|
||||
for user in mongo.users_collection.find({}):
|
||||
for user in mongo.users_collection.find({"hse_id": {"$ne": None}}):
|
||||
fetch_schedule_for_user(user['hse_id'])
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@ from helpers.mongo import mongo
|
||||
|
||||
|
||||
def process():
|
||||
for user in mongo.users_collection.find({"notify_minutes": {"$ne": None}}):
|
||||
for user in mongo.users_collection.find({"notify_minutes": {"$ne": None}, "hse_id": {"$ne": None}}):
|
||||
zone = zoneinfo.ZoneInfo("Europe/Moscow")
|
||||
now = datetime.datetime.now(zone)
|
||||
for lesson in mongo.lessons_collection.find({
|
||||
|
Loading…
Reference in New Issue
Block a user