lablink_client_service.update_inuse_status¶
lablink_client_service.update_inuse_status
¶
Attributes¶
API_RETRY_DELAY = 10
module-attribute
¶
MAX_API_RETRIES = 5
module-attribute
¶
logger = logging.getLogger(__name__)
module-attribute
¶
Classes¶
Functions:¶
api_callback(process_name, url, client_secret='')
¶
Callback to call the API when process state changes.
call_api(process_name, url, client_secret='')
¶
Source code in packages/client/src/lablink_client_service/update_inuse_status.py
default_callback(process_name)
¶
is_process_running(process_name)
¶
Check if a specific process is running.
Source code in packages/client/src/lablink_client_service/update_inuse_status.py
listen_for_process(process_name, interval=20, callback_func=None)
¶
Listen for a specific process to start or stop.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
process_name
|
str
|
The name of the process to listen for. |
required |
interval
|
int
|
The interval (in seconds) to check the process status. |
20
|
callback_func
|
callable
|
A callback function to execute when the process state changes. |
None
|