m8chaa commited on
Commit
d68bbde
·
verified ·
1 Parent(s): 8e30e38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -909,13 +909,13 @@ async def startup_event():
909
  app.state.drive_watcher = DriveWatcher()
910
  app.state.drive_service = build('drive', 'v3', credentials=APICredential)
911
 
912
- # # Fetch all users and initialize the watch list
913
- # users = users_collection_ref.get()
914
- # for user in users:
915
- # user_data = user.to_dict()
916
- # if 'gDrive_metadata' in user_data and 'uploaded' in user_data['gDrive_metadata']:
917
- # app.state.drive_watcher.watch_list[user.id] = user_data['gDrive_metadata']['uploaded']
918
- app.state.drive_watcher.watch_list["xJs8nDUdbVWvq1QIKY3VYmFkidn1"] = "1paIWJDmlLyWaGsB_eXrpP7ILZiw3Xb70"
919
 
920
  # Initial update of watch list channels
921
  app.state.drive_watcher.update_watch_list()
 
909
  app.state.drive_watcher = DriveWatcher()
910
  app.state.drive_service = build('drive', 'v3', credentials=APICredential)
911
 
912
+ # Fetch all users and initialize the watch list
913
+ users = users_collection_ref.get()
914
+ for user in users:
915
+ user_data = user.to_dict()
916
+ if 'gDrive_metadata' in user_data and 'uploaded' in user_data['gDrive_metadata']:
917
+ app.state.drive_watcher.watch_list[user.id] = user_data['gDrive_metadata']['uploaded']
918
+
919
 
920
  # Initial update of watch list channels
921
  app.state.drive_watcher.update_watch_list()