https://github.com/jonassiewertsen/statamic-jobs
Handles failing jobs file based, if you have no database. Ideal for a default Statamic setup.
https://github.com/jonassiewertsen/statamic-jobs
laravel php queue statamic statamic-addon
Last synced: about 1 year ago
JSON representation
Handles failing jobs file based, if you have no database. Ideal for a default Statamic setup.
- Host: GitHub
- URL: https://github.com/jonassiewertsen/statamic-jobs
- Owner: jonassiewertsen
- Created: 2021-06-18T23:35:29.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-12T12:08:26.000Z (about 2 years ago)
- Last Synced: 2025-03-29T02:12:08.153Z (about 1 year ago)
- Topics: laravel, php, queue, statamic, statamic-addon
- Language: PHP
- Homepage:
- Size: 113 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Statamic Jobs

[](https://packagist.org/packages/jonassiewertsen/statamic-jobs)
This addon does provide a simple solution for small Statamic setups:
A failing job will be saved as flat file in the `storage`.
Why should I use this addon?
Laravel does handle failed jobs by default, but does need a database. What if your Statamic setup does not have or need a database?
Well ... failing jobs can not be handled!
## Installation
### 1. Require the package
```bash
composer require jonassiewertsen/statamic-jobs
```
### 2. Configure the `Failed Queue Jobs` Driver
```php
// config/queue.php
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'file'),
// 'storage_path' => storage_path('failed-jobs'),
],
// INSTEAD of fx
// 'failed' => [
// 'driver' => env('QUEUE_FAILED_DRIVER', 'statamic'),
// 'database' => env('DB_CONNECTION', 'mysql'),
// 'table' => 'failed_jobs',
// ],
```
## Usage
You can access your failed jobs via the default artisan commands. Fx.:
`php artisan queue:failed` <- list all failed jobs
`php artisan queue:retry JOB_UUID_ID` <- Retry a given job
`php artisan queue:flush` <- Flush all failed jobs
## Requirements
- PHP >= 8.0
- Laravel 10
- Statamic 4
## Support
I love to share with the community. Nevertheless, it does take a lot of work, time and effort.
[Sponsor me on GitHub](https://github.com/sponsors/jonassiewertsen/) to support my work and the support for this addon.
## License
This plugin is published under the MIT license. Feel free to use it and remember to spread love.