masadonline commited on
Commit
ec6b812
·
verified ·
1 Parent(s): 078698e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -162,14 +162,13 @@ def start_conversation_monitor(client, index, embed_model, text_chunks):
162
  print(f"❌ Error in convo {convo_sid} polling:", e)
163
  time.sleep(5)
164
 
165
- def poll_new_conversations():
166
  print("➡️ Monitoring for new WhatsApp conversations...")
167
  while True:
168
  try:
169
  conversations = client.conversations.v1.conversations.list(limit=20)
170
  for convo in conversations:
171
  convo_full = client.conversations.v1.conversations(convo.sid).fetch()
172
- # convo_full.date_created should be available
173
  if convo.sid not in processed_convos and convo_full.date_created > APP_START_TIME:
174
  participants = client.conversations.v1.conversations(convo.sid).participants.list()
175
  for p in participants:
 
162
  print(f"❌ Error in convo {convo_sid} polling:", e)
163
  time.sleep(5)
164
 
165
+ def poll_new_conversations():
166
  print("➡️ Monitoring for new WhatsApp conversations...")
167
  while True:
168
  try:
169
  conversations = client.conversations.v1.conversations.list(limit=20)
170
  for convo in conversations:
171
  convo_full = client.conversations.v1.conversations(convo.sid).fetch()
 
172
  if convo.sid not in processed_convos and convo_full.date_created > APP_START_TIME:
173
  participants = client.conversations.v1.conversations(convo.sid).participants.list()
174
  for p in participants: