File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -307,12 +307,21 @@ def download_all_groups_tasks(firebase):
307307
308308 all_projects = fb_db .child ("projects" ).get ().val ()
309309
310- for project in all_projects .keys ():
310+ downloaded_groups = []
311+ downloaded_files = os .listdir ('data' )
312+
313+ for file in downloaded_files :
314+ if file .endswith ('_groups.csv' ):
315+ downloaded_groups .append (file .split ('_' )[0 ])
311316
317+ for project in all_projects .keys ():
318+ # skip downlaoded groups
319+ if project in downloaded_groups :
320+ continue
312321 group_ids = fb_db .child ("groups" ).child (project ).shallow ().get ().val ()
313322
314323 # this tries to set the max pool connections to 100
315- adapter = requests .adapters .HTTPAdapter (max_retries = 5 , pool_connections = 100 , pool_maxsize = 100 )
324+ adapter = requests .adapters .HTTPAdapter (max_retries = 10 , pool_connections = 100 , pool_maxsize = 100 )
316325 for scheme in ('http://' , 'https://' ):
317326 fb_db .requests .mount (scheme , adapter )
318327
You can’t perform that action at this time.
0 commit comments