bec_lib.scan_manager.ScanManager#
- class ScanManager(connector)[source]#
Bases:
object
ScanManager is a class that provides a convenient way to interact with the scan queue as well as the requests and scans that are currently running or have been completed. It also contains storage container for the queue, requests and scans.
- Parameters:
connector (BECConnector) – BECConnector instance
Methods
request a scan queue reset
request a scan abortion
request a scan continuation
request a scan halt
request a scan interruption
request to restart a scan
shutdown
update storage with a new queue status message
Attributes
get the next dataset number from redis
get the next scan number from redis
- property next_dataset_number#
get the next dataset number from redis
- property next_scan_number#
get the next scan number from redis
- request_scan_abortion(scan_id=None)[source]#
request a scan abortion
- Parameters:
scan_id (str, optional) – ScanID. Defaults to None.
- request_scan_continuation(scan_id=None)[source]#
request a scan continuation
- Parameters:
scan_id (str, optional) – ScanID. Defaults to None.
- request_scan_halt(scan_id=None)[source]#
request a scan halt
- Parameters:
scan_id (str, optional) – ScanID. Defaults to None.
- request_scan_interruption(deferred_pause=True, scan_id: str | None = None) None [source]#
request a scan interruption
- Parameters:
deferred_pause (bool, optional) – Request a deferred pause. If False, a pause will be requested. Defaults to True.
scan_id (str, optional) – ScanID. Defaults to None.
- request_scan_restart(scan_id=None, requestID=None, replace=True) str [source]#
request to restart a scan
- update_with_queue_status(queue: ScanQueueStatusMessage) None [source]#
update storage with a new queue status message