firesphere / healthcheckjobs
Run symbiote/queuedjobs, and ping a Healthchecks.io endpoint for start/finish/failure
0.1.0
2023-10-29 00:54 UTC
Requires
- guzzlehttp/guzzle: >=6
- silverstripe/crontask: ^3|^2
- symbiote/silverstripe-queuedjobs: ^5.0|^4.0
README
You can either self-host healthchecks, or create an account at healthchecks.io
If no title is set, the classname will be used as title.
Configuration:
--- name: my-healthchecks --- Firesphere\HealthcheckJobs\Services\HealthcheckService: endpoint: 'https://health.example.com' api_key: 'my-api-key-here' # Note, API Keys are per PROJECT, not
Add a time-out and grace time
Add the following to your queued job:
public function getTimeout() { return $time_in_seconds; } public function getGrace() { return $time_in_seconds; }
Add a cron formatted schedule
public function getSchedule() { return '*/5 * * * *'; // A valid cron schedule }