lunarflu HF staff commited on
Commit
c5b8a78
1 Parent(s): 8c2219a

minutes=1, words=5

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -124,7 +124,7 @@ async def on_message(message):
124
  await bot.process_commands(message)
125
 
126
 
127
- def extract_adjacent_words(content, trigger, num_words=3):
128
  words = content.split()
129
  pattern = r'\b' + r'\b\s*\b'.join(map(re.escape, trigger)) + r'\b'
130
  regex = re.compile(pattern, re.IGNORECASE)
@@ -244,7 +244,7 @@ def unreact_to_slack_message(thread_ts, emoji):
244
  def send_daily_pings():
245
  global daily_pings
246
  if daily_pings:
247
- print("sending daily pings...")
248
  # combine into one message
249
  main_message = slack_client.chat_postMessage(
250
  channel=SLACK_CHANNEL_ID_TEST,
@@ -267,7 +267,7 @@ def send_daily_pings():
267
  # pings -------------------------------------------------------------------------------------------
268
  executor = ThreadPoolExecutor(max_workers=1)
269
  scheduler = BackgroundScheduler(executors={'default': executor})
270
- scheduler.add_job(send_daily_pings, trigger='interval', seconds=10)
271
  scheduler.start()
272
 
273
 
 
124
  await bot.process_commands(message)
125
 
126
 
127
+ def extract_adjacent_words(content, trigger, num_words=5):
128
  words = content.split()
129
  pattern = r'\b' + r'\b\s*\b'.join(map(re.escape, trigger)) + r'\b'
130
  regex = re.compile(pattern, re.IGNORECASE)
 
244
  def send_daily_pings():
245
  global daily_pings
246
  if daily_pings:
247
+ print(f"sending daily pings...{daily_pings")
248
  # combine into one message
249
  main_message = slack_client.chat_postMessage(
250
  channel=SLACK_CHANNEL_ID_TEST,
 
267
  # pings -------------------------------------------------------------------------------------------
268
  executor = ThreadPoolExecutor(max_workers=1)
269
  scheduler = BackgroundScheduler(executors={'default': executor})
270
+ scheduler.add_job(send_daily_pings, trigger='interval', minutes=1)
271
  scheduler.start()
272
 
273