Skip to content

Commit

Permalink
Update the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Siewertsen committed Jun 28, 2021
1 parent 3bb0e90 commit 5512ec7
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,44 @@
![Statamic 3.1+](https://img.shields.io/badge/Statamic-3.1+-FF269E?style=for-the-badge&link=https://statamic.com)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/jonassiewertsen/statamic-jobs.svg?style=for-the-badge)](https://packagist.org/packages/jonassiewertsen/statamic-jobs)

Laravel does handle failed jobs by default, but does need a database. What if your Statamic setup does not have or need any database?
Well ... failing jobs can not be handled!

This addon does provide a simple solution for small Statamic setups:
A failing job will be saved as flat file in the `storage`.

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

## NOT PRODUCTION READY JET
Be aware, that this is an early version, which shouldn't be used on any production server jet.

## 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', 'statamic'),
// 'storage_path' => storage_path('failed-jobs'),
],

// INSTEAD of fx
// 'failed' => [
// 'driver' => env('QUEUE_FAILED_DRIVER', 'statamic'),
// 'database' => env('DB_CONNECTION', 'mysql'),
// 'table' => 'failed_jobs',
// ],
```

## Requirements
- PHP 8.0
- Laravel 8
Expand Down

0 comments on commit 5512ec7

Please sign in to comment.