lunarflu HF staff commited on
Commit
123b00d
1 Parent(s): dd09b31

scheduler.add_job(max_instances=1)

Browse files

Execution of job "update_google_sheet (trigger: interval[0:01:00], next run at: 2024-02-04 15:51:01 CET)" skipped: maximum number of running instances reached (1)
on_message Error: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -71,6 +71,7 @@ async def on_ready():
71
  global_df = data
72
  print(f"csv successfully retrieved: \n {global_df}")
73
  #data.to_csv(csv_file, index=False)
 
74
  except Exception as e:
75
  print(f"on_message Error: {e}")
76
 
@@ -99,7 +100,7 @@ def update_google_sheet():
99
 
100
  executor = ThreadPoolExecutor(max_workers=1)
101
  scheduler = BackgroundScheduler(executors={'default': executor})
102
- scheduler.add_job(update_google_sheet, trigger='interval', minutes=1)
103
  scheduler.start()
104
  """
105
  scheduler = BackgroundScheduler()
@@ -272,7 +273,7 @@ async def add_exp(member_id):
272
  #You can verify your account to earn 100 points! To verify, do A.
273
 
274
 
275
- print(f"----------------------------------------------------")
276
  if not member_found:
277
  # if not, create new record
278
  print(f"creating new record for {member}")
@@ -294,7 +295,7 @@ async def add_exp(member_id):
294
  if lvl1 not in member.roles:
295
  await member.add_roles(lvl1)
296
  print(f"Gave {member} {lvl1}") # can log this better
297
- print(f"----------------------------------------------------")
298
 
299
  """
300
  if member_id == 811235357663297546:
 
71
  global_df = data
72
  print(f"csv successfully retrieved: \n {global_df}")
73
  #data.to_csv(csv_file, index=False)
74
+ print(f"------------------------------------------------------------------------")
75
  except Exception as e:
76
  print(f"on_message Error: {e}")
77
 
 
100
 
101
  executor = ThreadPoolExecutor(max_workers=1)
102
  scheduler = BackgroundScheduler(executors={'default': executor})
103
+ scheduler.add_job(update_google_sheet, trigger='interval', minutes=1, max_instances=1)
104
  scheduler.start()
105
  """
106
  scheduler = BackgroundScheduler()
 
273
  #You can verify your account to earn 100 points! To verify, do A.
274
 
275
 
276
+ print(f"------------------------------------------------------------------------")
277
  if not member_found:
278
  # if not, create new record
279
  print(f"creating new record for {member}")
 
295
  if lvl1 not in member.roles:
296
  await member.add_roles(lvl1)
297
  print(f"Gave {member} {lvl1}") # can log this better
298
+ print(f"------------------------------------------------------------------------")
299
 
300
  """
301
  if member_id == 811235357663297546: