manzadey/sentry-cron-monitor

Package for sentry cron monitors

v0.1.1 2023-02-23 19:51 UTC

This package is auto-updated.

Last update: 2024-10-24 00:18:15 UTC


README

Latest Version on Packagist PHPUnit tests Total Downloads

Installation

You can install the package via composer:

composer require manzadey/sentry-cron-monitor

Usage

use Manzadey\SentryCronMonitor\CronMonitor;

$monitor = new CronMonitor('dsn');

$monitor->progress('monitorId');
// Get data from progress request
$monitor->getDataProgress();

// our code...

// if a failure is detected in the execution of the task
$monitor->error();

// Get data from error request
$monitor->getDataError();

// or if your task is completed successfully
$monitor->ok(); 

// Get data from ok request
$monitor->getDataOk();

// Get all data from requests
$monitor->getData();

// get exception errors
$monitor->getErrors();

// check exception errors
$monitor->hasErrors();

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.