Python library for sending updates to lucos_schedule_tracker
Project description
lucos_schedule_tracker_pythonclient
Python library for sending updates to lucos_schedule_tracker.
This library posts to the v2 /report-status endpoint. See ADR-0004 for the architectural background on system vs job_name.
Configuration
The following environment variables must be set for the library to function:
SYSTEM: A unique identifier for the system being tracked. This is used as theUser-Agentheader and as the defaultsystemname in reports.SCHEDULE_TRACKER_ENDPOINT: The v2 report endpoint URL of thelucos_schedule_trackerinstance (e.g.,https://schedule-tracker.example.com/v2/report-status). The URL must contain/v2/— the library validates this at startup and exits with an error if it does not.
Usage
from schedule_tracker import updateScheduleTracker
# Report a successful run
updateScheduleTracker(True, "ingestor_dbpedia")
# Report a failure with a message
updateScheduleTracker(False, "ingestor_loc", message="Database connection failed")
API Reference
updateScheduleTracker(success: bool, job_name: str, system: str = SYSTEM, message: str | None = None, frequency: int = 86400)
Sends a status update to the v2 schedule tracker endpoint.
success(bool, required): Whether the job completed successfully.job_name(str, required): A sub-job identifier within the system (e.g."ingestor_dbpedia_meanOfTransportation"). Naming the job explicitly makes it easier to add further jobs to the same system later without schema changes.system(str, optional): The identifier for the owning system (e.g."lucos_arachne"). Defaults to the value of theSYSTEMenvironment variable.message(str | None, optional): A human-readable message, typically used to provide details on failure.frequency(int, optional): How often the job is expected to run, in seconds. Defaults to86400(24 hours).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lucos_schedule_tracker_pythonclient-2.0.4.tar.gz.
File metadata
- Download URL: lucos_schedule_tracker_pythonclient-2.0.4.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
825fddb1391a6f61afd662c1e9cd8be74a5d74b9ebbcdabc2824a62de3ef1d30
|
|
| MD5 |
27c340daf6c143f68d0e0fef8456002c
|
|
| BLAKE2b-256 |
d3edc9f6cb5cfed4110454786f54ff01ad0689bc116e5e6ad29339cfd55d6e4f
|
File details
Details for the file lucos_schedule_tracker_pythonclient-2.0.4-py3-none-any.whl.
File metadata
- Download URL: lucos_schedule_tracker_pythonclient-2.0.4-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31a94a42183fdcec7dbdef8f4367d32d6546e57098da31d91cde9ad5a41c05b4
|
|
| MD5 |
14ecbd18f6e7932eca67b5cc1309ef40
|
|
| BLAKE2b-256 |
43820613cd15df6ec2e18f7f909df5153f72fa1b719a606f4faecc6e8d26548d
|