cremalink.local_server_app.jobs module
This module defines and manages the background jobs for the local server. These jobs run periodically in asyncio tasks to handle keep-alive, status monitoring, and re-keying operations.
- class cremalink.local_server_app.jobs.JobManager[source]
Bases:
objectA simple manager for starting and stopping asyncio background tasks.
- async cremalink.local_server_app.jobs.monitor_job(st: LocalServerState, settings: ServerSettings, stop_event: Event)[source]
Periodically queues a request to fetch the device’s monitoring status.
- async cremalink.local_server_app.jobs.nudger_job(st: LocalServerState, adapter: DeviceAdapter, settings: ServerSettings, stop_event: Event)[source]
Periodically “nudges” the device by sending a registration request.
This is a key part of the protocol. The device often needs to be prompted to send data. This job ensures that registration is maintained, especially if there are pending commands in the queue.
- async cremalink.local_server_app.jobs.rekey_job(state: LocalServerState, adapter: DeviceAdapter, settings: ServerSettings, stop_event: Event)[source]
Periodically triggers a full cryptographic re-keying process.
This enhances security by ensuring session keys are not long-lived.