ZettaIO / cachet-client

A python 3.6+ client for the Cachet API : https://cachet-client.readthedocs.io/
MIT License
14 stars 8 forks source link

Does 2.3.x use issues for scheduled tasks? #3

Open einarf opened 5 years ago

einarf commented 5 years ago

Test using a real cachet service. Document it!

einarf commented 4 years ago

Scheduled tasks are returned by the incidents endpoint:

{
    'id': 91,
    'component_id': 0,
    'name': 'Maintenance Tomorrow',
    'status': 0,
    'visible': 1,
    'message': 'Shit might happen',
    'scheduled_at': '2019-09-25 17:53:00',
    'created_at': '2019-09-24 17:53:34',
    'updated_at': '2019-09-24 17:53:34',
    'deleted_at': None,
    'human_status': 'Scheduled'
}

They are easy to separate by checking the status field value of INCIDENT_SCHEDULED = 0. https://github.com/ZettaIO/cachet-client/blob/eb5d1a05ef72e493e4eb6bd6c1c98a18e84fba85/cachetclient/v1/enums.py#L34

einarf commented 4 years ago

We have added schedules for cachet 2.4. We still might want to document this difference?

Leaving this hanging for a bit more in case someone finds it useful.