youssef1214 commited on
Commit
ffecd68
1 Parent(s): 640c929

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -233,13 +233,13 @@ thread.start()
233
  #lithening to changes of documnts
234
  callback_done = threading.Event()
235
  def on_snapshot(doc_snapshot, changes, read_time):
 
 
236
  for doc in doc_snapshot:
237
  # print(doc.to_dict())
238
  shakw = Classes.Shakwa.from_dict(source=doc.to_dict())
239
  shakw.complaintbody
240
- if shakw.summary==None:
241
- global queuedUnSummurizedShawkas
242
- global semphoreShakwas
243
  queuedUnSummurizedShawkas.append(shakw)
244
  semphoreShakwas.release()
245
  callback_done.set()
 
233
  #lithening to changes of documnts
234
  callback_done = threading.Event()
235
  def on_snapshot(doc_snapshot, changes, read_time):
236
+ global queuedUnSummurizedShawkas
237
+ global semphoreShakwas
238
  for doc in doc_snapshot:
239
  # print(doc.to_dict())
240
  shakw = Classes.Shakwa.from_dict(source=doc.to_dict())
241
  shakw.complaintbody
242
+ if shakw.summary==None and shakw not in queuedUnSummurizedShawkas :
 
 
243
  queuedUnSummurizedShawkas.append(shakw)
244
  semphoreShakwas.release()
245
  callback_done.set()