Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mffzoom
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wizards
mffzoom
Commits
0ce2878d
Commit
0ce2878d
authored
5 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
fetch-meetings --user
parent
6d4a8ae4
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
TODO
+4
-3
4 additions, 3 deletions
TODO
hook/fetch-meetings.py
+12
-2
12 additions, 2 deletions
hook/fetch-meetings.py
with
16 additions
and
5 deletions
TODO
+
4
−
3
View file @
0ce2878d
DB:
- Trigger na "last modified" u meetingů
- indexy
- vazby: on delete cascade
Hook:
- 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ů
App:
- ukončovat transakce
This diff is collapsed.
Click to expand it.
hook/fetch-meetings.py
+
12
−
2
View file @
0ce2878d
...
...
@@ -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():
db_conn
.
commit
()
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
)
db_conn
.
commit
()
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
fetch_user
(
args
.
user
)
else
:
print
(
"
Nothing to do.
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment