lunarflu HF staff commited on
Commit
be6073e
1 Parent(s): 51d8ee2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -83,7 +83,7 @@ async def on_ready():
83
 
84
  # updates both leaderboards
85
  remove_huggingfolks.start()
86
- await periodic_api_test()
87
  print(f"------------------------------------------------------------------------")
88
  except Exception as e:
89
  print(f"on_ready Error: {e}")
@@ -104,22 +104,15 @@ def update_google_sheet():
104
  "type": 'TEXT',
105
  },
106
  })
107
- worksheet2_df['discord_user_id'] = worksheet2_df['discord_user_id'].astype(str)
108
- worksheet2_df['id_recover_test'] = worksheet2_df['id_recover_test'].astype(str)
109
- set_with_dataframe(worksheet2, worksheet2_df)
110
  timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
111
  print(f"Google sheet {name} successfully updated at {timestamp}! \n{global_df}")
112
  print(f"------------------------------------------------------------------------")
113
  except Exception as e:
114
  print(f"update_google_sheet Error: {e}")
115
-
116
-
117
-
118
 
119
-
120
  executor = ThreadPoolExecutor(max_workers=1)
121
  scheduler = BackgroundScheduler(executors={'default': executor})
122
- scheduler.add_job(update_google_sheet, trigger='interval', minutes=2, max_instances=1)
123
  scheduler.start()
124
 
125
 
 
83
 
84
  # updates both leaderboards
85
  remove_huggingfolks.start()
86
+ #await periodic_api_test()
87
  print(f"------------------------------------------------------------------------")
88
  except Exception as e:
89
  print(f"on_ready Error: {e}")
 
104
  "type": 'TEXT',
105
  },
106
  })
 
 
 
107
  timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
108
  print(f"Google sheet {name} successfully updated at {timestamp}! \n{global_df}")
109
  print(f"------------------------------------------------------------------------")
110
  except Exception as e:
111
  print(f"update_google_sheet Error: {e}")
 
 
 
112
 
 
113
  executor = ThreadPoolExecutor(max_workers=1)
114
  scheduler = BackgroundScheduler(executors={'default': executor})
115
+ scheduler.add_job(update_google_sheet, trigger='interval', minutes=1, max_instances=1)
116
  scheduler.start()
117
 
118