youssef1214 commited on
Commit
b29af5a
1 Parent(s): 82a3d32

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +9 -8
main.py CHANGED
@@ -216,14 +216,15 @@ def genereteotp (email):
216
  queuedUnSummurizedShawkas = []
217
  semphoreShakwas=threading.Semaphore(0)
218
  def summrizedshakwas():
219
- global queuedUnSummurizedShawkas
220
- global semphoreShakwas
221
- semphoreShakwas.acquire()
222
- shawka=queuedUnSummurizedShawkas.pop(0)
223
- tmpdict= modelsummary(shawka.complaintbody)
224
- shawka.summary=tmpdict['summary']
225
- shawka.set_data()
226
- thread = threading.Thread(target=summrizedshakwas, args=(,))
 
227
  thread.start()
228
 
229
  #lithening to changes of documnts
 
216
  queuedUnSummurizedShawkas = []
217
  semphoreShakwas=threading.Semaphore(0)
218
  def summrizedshakwas():
219
+ while True:
220
+ semphoreShakwas.acquire()
221
+ global queuedUnSummurizedShawkas
222
+ global semphoreShakwas
223
+ shawka=queuedUnSummurizedShawkas.pop(0)
224
+ tmpdict= modelsummary(shawka.complaintbody)
225
+ shawka.summary=tmpdict['summary']
226
+ shawka.set_data()
227
+ thread = threading.Thread(target=summrizedshakwas)
228
  thread.start()
229
 
230
  #lithening to changes of documnts