superbolt/core-php

PHP package for Superbolt

dev-master 2020-05-01 18:27 UTC

This package is auto-updated.

Last update: 2024-04-29 04:20:40 UTC


README

Latest Version on Packagist GitHub Workflow Status Total Downloads

Debugging background tasks is already hard enough as it is. Superbolt monitors your scheduled tasks and saves the logs for you.

This package integrates access to the Superbolt API with your PHP application.

Installation

Via Composer

$ composer require superbolt/core-php

Usage

$apiClient = new Superbolt\Core\Api('YOUR_SUPERBOLT_API_KEY');
$cronLogger = new Superbolt\Core\Cron($api);

$startResponse = $cronLogger->sendStartPing('HelloWorldCommand', '* * * * *', 'production');
$finishResponse = $cronLogger->sendFinishPing($startResponse->getCronToken(), 0);
$logResponse = $cronLogger->sendLog($finishResponse->getCronToken(), 'Hello World', 0);

Have a look at Cron.php to see how each method exactly works. The tests of course also are a great case of how this package can be used.

Change log

Please see the changelog for more information on what has changed recently.

Testing

vendor/bin/phpunit

Security

If you discover any security related issues, please email info@superbolt.app instead of using the issue tracker.

Credits

License

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