Commit 0ce2878d authored by Martin Mareš's avatar Martin Mareš
Browse files

fetch-meetings --user

parent 6d4a8ae4
- Trigger na "last modified" u meetingů
- indexy
- vazby: on delete cascade
- Adjust number of workers
- Ztlumit logování
- další hooky: create/delete user, start/end meeting, participants
- další hooky: create/delete user
- přehlednější log
- logování raw JSONů
- ukončovat transakce
......@@ -133,7 +133,6 @@ def get_meetings(uid, user_id):
def fetch_all():
db.execute('DELETE FROM zoom_schedule')
db.execute('DELETE FROM zoom_meetings')
db.execute("SELECT * FROM zoom_users")
......@@ -144,6 +143,17 @@ def fetch_all():
def fetch_user(user_email):
db.execute("SELECT * FROM zoom_users WHERE email=%s", (user_email,))
u = db.fetchone()
if not u:
die("No such user.")
db.execute('DELETE FROM zoom_meetings WHERE host_uid=%s', (u.uid,))
get_meetings(u.uid, u.user_id)
def fetch_single(user_email, meeting_id):
db.execute("SELECT * FROM zoom_meetings WHERE meeting_id=%s", (meeting_id,))
meeting_row = db.fetchone()
......@@ -189,6 +199,6 @@ if args.all:
elif args.meeting is not None:
fetch_single(args.user, args.meeting)
elif args.user is not None:
raise NotImplementedError
print("Nothing to do.")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment