Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
adrolli committed Aug 29, 2023
1 parent 1a7ff14 commit 62e857e
Showing 1 changed file with 82 additions and 2 deletions.
84 changes: 82 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,94 @@ Work in progress. Should become a Filament panel for managing job queues includi

## Installation

You should install the package via Composer:
Install the package via Composer:

```bash
composer require adrolli/filament-job-manager
php artisan vendor:publish --tag=filament-job-manager
```

### Authorization
Create the necessary tables, if not using Redis as backend for queues:

```bash
php artisan queue:table
php artisan queue:failed-table
php artisan queue:batches-table
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="filament-jobs-monitor-config"
```



This is the content of the published config file:

```
<?php
return [
'resources' => [
'jobs' => [
'enabled' => true,
'label' => 'Job',
'plural_label' => 'Jobs',
'navigation_group' => 'Job manager',
'navigation_icon' => 'heroicon-o-cpu-chip',
'navigation_sort' => 1,
'navigation_count_badge' => false,
'resource' => Adrolli\FilamentJobManager\Resources\JobsResource::class,
],
'failed_jobs' => [
'enabled' => true,
'label' => 'Failed Job',
'plural_label' => 'Failed Jobs',
'navigation_group' => 'Job manager',
'navigation_icon' => 'heroicon-o-exclamation-circle',
'navigation_sort' => 2,
'navigation_count_badge' => false,
'resource' => Adrolli\FilamentJobManager\Resources\FailedJobsResource::class,
],
'job_batches' => [
'enabled' => true,
'label' => 'Job Batch',
'plural_label' => 'Job Batches',
'navigation_group' => 'Job manager',
'navigation_icon' => 'heroicon-o-inbox-stack',
'navigation_sort' => 3,
'navigation_count_badge' => false,
'resource' => Adrolli\FilamentJobManager\Resources\JobBatchesResource::class,
],
],
'pruning' => [
'enabled' => true,
'retention_days' => 7,
],
];
```



You can publish and run the migrations with:

```
php artisan vendor:publish --tag="filament-jobs-monitor-migrations"
php artisan migrate
```



## Usage

Just run a Background Job and go to the route `/admin/queue-monitors` to see the jobs.



### Authorization - outdated! Use Shield instead!

If you would like to prevent certain users from accessing your page, you should register a policy:

Expand Down

0 comments on commit 62e857e

Please sign in to comment.