fix cancelled bug
This commit is contained in:
@@ -89,16 +89,17 @@ class GuildLogs:
|
|||||||
return self.locked and self.log_file not in current_analysis
|
return self.locked and self.log_file not in current_analysis
|
||||||
|
|
||||||
def lock(self) -> bool:
|
def lock(self) -> bool:
|
||||||
self.locked = True
|
|
||||||
current_analysis_lock.acquire()
|
current_analysis_lock.acquire()
|
||||||
if self.log_file in current_analysis:
|
if self.log_file in current_analysis:
|
||||||
current_analysis_lock.release()
|
current_analysis_lock.release()
|
||||||
return False
|
return False
|
||||||
|
self.locked = True
|
||||||
current_analysis.append(self.log_file)
|
current_analysis.append(self.log_file)
|
||||||
current_analysis_lock.release()
|
current_analysis_lock.release()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def unlock(self):
|
def unlock(self):
|
||||||
|
if self.locked:
|
||||||
self.locked = False
|
self.locked = False
|
||||||
current_analysis_lock.acquire()
|
current_analysis_lock.acquire()
|
||||||
if self.log_file in current_analysis:
|
if self.log_file in current_analysis:
|
||||||
|
|||||||
Reference in New Issue
Block a user