Make scan directory manager thread safe
This commit is contained in:
parent
4b4256aefe
commit
9be9097246
4 changed files with 161 additions and 0 deletions
|
|
@ -717,6 +717,9 @@ class SmartScanThing(lt.Thing):
|
|||
This is a wrapper around scan manager's delete_scan that logs to the
|
||||
invocation logger id there is a problem.
|
||||
"""
|
||||
if self._ongoing_scan is not None and scan_name == self._ongoing_scan.name:
|
||||
logger.error("Attempted to delete ongoing scan.")
|
||||
return False
|
||||
try:
|
||||
self._scan_dir_manager.delete_scan(scan_name)
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue