Skip to content

Commit

Permalink
Change Namespace of Jobs (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrolli authored Dec 7, 2023
1 parent ba95fe5 commit 9e6d764
Show file tree
Hide file tree
Showing 47 changed files with 484 additions and 520 deletions.
1 change: 1 addition & 0 deletions .github/workflows/monorepo-split-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
matrix:
package:
- blog
- jobs

steps:
- uses: actions/checkout@v4
Expand Down
22 changes: 11 additions & 11 deletions _packages/jobs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
# Changelog

All notable changes to `filament-job-manager` will be documented in this file.
All notable changes to `jobs` will be documented in this file.

## v0.6.1 - 2022-12-08

- focus relevant information in failed jobs index table
- focus relevant information in failed jobs index table

## v0.6.0 - 2022-10-06

- introduce https://github.com/invaders-xx/filament-jsoneditor for `payload`
- introduce https://github.com/invaders-xx/filament-jsoneditor for `payload`

## v0.5.1 - 2022-09-08

- do not show 'options' column in JobBatchesResource
- do not show 'options' column in JobBatchesResource

## v0.5.0 - 2022-09-08

- place FailedJobResource and JobBatchesResource in 'jobs' Navigation Group
- place FailedJobResource and JobBatchesResource in 'jobs' Navigation Group

## v0.4.0 - 2022-08-29

- introduced ability to delete failed jobs or job batches
- introduced ability to delete failed jobs or job batches

## v0.3.2 - 2022-08-29

- introduced `job_batches` Resource (if the sql table is present)
- introduced `job_batches` Resource (if the sql table is present)

## v0.2.0 - 2022-08-09

- introduced 'view' ViewAction to see job details as popup
- introduced Bulk Action for Retry
- introduced 'Retry all failed jobs' Button
- introduced 'view' ViewAction to see job details as popup
- introduced Bulk Action for Retry
- introduced 'Retry all failed jobs' Button

## v0.1.0 - 2022-08-09

- initial release
- initial release
38 changes: 18 additions & 20 deletions _packages/jobs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


![filament-banner](./docs/filament-banner.jpg)

# Filament Job Manager
Expand Down Expand Up @@ -43,13 +41,13 @@ This Laravel package is made for Filament 3 and the awesome TALL-Stack.
Install the package via Composer:

```bash
composer require adrolli/filament-job-manager
composer require adrolli/jobs
```

Create the necessary tables:

```bash
php artisan vendor:publish --tag="filament-job-manager-migrations"
php artisan vendor:publish --tag="jobs-migrations"

# Queue tables, if using the database driver instead of Redis queue backend
php artisan queue:table
Expand All @@ -62,7 +60,7 @@ php artisan migrate
Publish the config file with:

```bash
php artisan vendor:publish --tag="filament-job-manager-config"
php artisan vendor:publish --tag="jobs-config"
```

This is the content of the published config file:
Expand All @@ -78,7 +76,7 @@ return [
'navigation_icon' => 'heroicon-o-play',
'navigation_sort' => 1,
'navigation_count_badge' => true,
'resource' => Adrolli\FilamentJobManager\Resources\JobsResource::class,
'resource' => Moox\Jobs\Resources\JobsResource::class,
],
'jobs_waiting' => [
'enabled' => true,
Expand All @@ -88,7 +86,7 @@ return [
'navigation_icon' => 'heroicon-o-pause',
'navigation_sort' => 2,
'navigation_count_badge' => true,
'resource' => Adrolli\FilamentJobManager\Resources\WaitingJobsResource::class,
'resource' => Moox\Jobs\Resources\WaitingJobsResource::class,
],
'failed_jobs' => [
'enabled' => true,
Expand All @@ -98,7 +96,7 @@ return [
'navigation_icon' => 'heroicon-o-exclamation-triangle',
'navigation_sort' => 3,
'navigation_count_badge' => true,
'resource' => Adrolli\FilamentJobManager\Resources\FailedJobsResource::class,
'resource' => Moox\Jobs\Resources\FailedJobsResource::class,
],
'job_batches' => [
'enabled' => true,
Expand All @@ -108,7 +106,7 @@ return [
'navigation_icon' => 'heroicon-o-inbox-stack',
'navigation_sort' => 4,
'navigation_count_badge' => true,
'resource' => Adrolli\FilamentJobManager\Resources\JobBatchesResource::class,
'resource' => Moox\Jobs\Resources\JobBatchesResource::class,
],
],
'pruning' => [
Expand All @@ -122,18 +120,18 @@ Register the Plugins in `app/Providers/Filament/AdminPanelProvider.php`:

```php
->plugins([
FilamentJobsPlugin::make(),
FilamentWaitingJobsPlugin::make(),
FilamentFailedJobsPlugin::make(),
FilamentJobBatchesPlugin::make(),
JobsPlugin::make(),
JobsWaitingPlugin::make(),
JobsFailedPlugin::make(),
JobsBatchesPlugin::make(),
])
```

Instead of publishing and modifying the config-file, you can also do all settings in AdminPanelProvider like so:

```php
->plugins([
FilamentJobsPlugin::make()
JobsPlugin::make()
->label('Job runs')
->pluralLabel('Jobs that seems to run')
->enableNavigation(true)
Expand All @@ -143,15 +141,15 @@ Instead of publishing and modifying the config-file, you can also do all setting
->navigationCountBadge(true)
->enablePruning(true)
->pruningRetention(7),
FilamentWaitingJobsPlugin::make()
JobsWaitingPlugin::make()
->label('Job waiting')
->pluralLabel('Jobs waiting in line')
->enableNavigation(true)
->navigationIcon('heroicon-o-calendar')
->navigationGroup('My Jobs and Queues')
->navigationSort(5)
->navigationCountBadge(true)
FilamentFailedJobsPlugin::make()
JobsFailedPlugin::make()
->label('Job failed')
->pluralLabel('Jobs that failed hard')
->enableNavigation(true)
Expand Down Expand Up @@ -182,7 +180,7 @@ You do not need to change anything in your Jobs to work with Filament Job Monito

namespace App\Jobs;

use Adrolli\FilamentJobManager\Traits\JobProgress;
use Moox\Jobs\Traits\JobProgress;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
Expand Down Expand Up @@ -221,9 +219,9 @@ If you would like to prevent certain users from accessing your page, you can reg

```php
use App\Policies\JobMonitorPolicy;
use Adrolli\FilamentJobManager\Models\FailedJob;
use Adrolli\FilamentJobManager\Models\JobBatch;
use Adrolli\FilamentJobManager\Models\JobMonitor;
use Moox\Jobs\Models\FailedJob;
use Moox\Jobs\Models\JobBatch;
use Moox\Jobs\Models\JobMonitor;

class AuthServiceProvider extends ServiceProvider
{
Expand Down
14 changes: 7 additions & 7 deletions _packages/jobs/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adrolli/filament-job-manager",
"description": "A Filament panel for managing job queues including failed jobs and batches.",
"name": "moox/jobs",
"description": "Manage Job Queues, Failed Jobs and Batches in Filament.",
"keywords": [
"laravel",
"filament",
Expand All @@ -11,7 +11,7 @@
"monitor",
"redis"
],
"homepage": "https://github.com/adrolli/filament-job-manager",
"homepage": "https://github.com/mooxphp/jobs",
"license": "MIT",
"authors": [
{
Expand All @@ -29,7 +29,7 @@
"require-dev": {},
"autoload": {
"psr-4": {
"Adrolli\\FilamentJobManager\\": "src"
"Moox\\Jobs\\": "src"
}
},
"config": {
Expand All @@ -38,11 +38,11 @@
"extra": {
"laravel": {
"providers": [
"Adrolli\\FilamentJobManager\\FilamentJobManagerServiceProvider",
"Adrolli\\FilamentJobManager\\JobManagerProvider"
"Moox\\Jobs\\JobsServiceProvider",
"Moox\\Jobs\\JobManagerProvider"
],
"aliases": {
"JobMonitor": "Adrolli\\FilamentJobManager\\JobManagerProvider\\Facade"
"JobMonitor": "Moox\\Jobs\\JobManagerProvider\\Facade"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'navigation_icon' => 'heroicon-o-play',
'navigation_sort' => 1,
'navigation_count_badge' => true,
'resource' => Adrolli\FilamentJobManager\Resources\JobsResource::class,
'resource' => Moox\Jobs\Resources\JobsResource::class,
],
'jobs_waiting' => [
'enabled' => true,
Expand All @@ -20,7 +20,7 @@
'navigation_icon' => 'heroicon-o-pause',
'navigation_sort' => 2,
'navigation_count_badge' => true,
'resource' => Adrolli\FilamentJobManager\Resources\WaitingJobsResource::class,
'resource' => Moox\Jobs\Resources\WaitingJobsResource::class,
],
'failed_jobs' => [
'enabled' => true,
Expand All @@ -30,7 +30,7 @@
'navigation_icon' => 'heroicon-o-exclamation-triangle',
'navigation_sort' => 3,
'navigation_count_badge' => true,
'resource' => Adrolli\FilamentJobManager\Resources\FailedJobsResource::class,
'resource' => Moox\Jobs\Resources\FailedJobsResource::class,
],
'job_batches' => [
'enabled' => true,
Expand All @@ -40,7 +40,7 @@
'navigation_icon' => 'heroicon-o-inbox-stack',
'navigation_sort' => 4,
'navigation_count_badge' => true,
'resource' => Adrolli\FilamentJobManager\Resources\JobBatchesResource::class,
'resource' => Moox\Jobs\Resources\JobBatchesResource::class,
],
],
'pruning' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ return new class extends Migration
{
Schema::dropIfExists('job_manager');
}
};
};
11 changes: 0 additions & 11 deletions _packages/jobs/routes/web.php

This file was deleted.

49 changes: 0 additions & 49 deletions _packages/jobs/src/Controllers/QueueController.php

This file was deleted.

18 changes: 0 additions & 18 deletions _packages/jobs/src/FilamentJobManagerServiceProvider.php

This file was deleted.

4 changes: 2 additions & 2 deletions _packages/jobs/src/JobManagerProvider.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

namespace Adrolli\FilamentJobManager;
namespace Moox\Jobs;

use Adrolli\FilamentJobManager\Models\JobManager;
use Illuminate\Contracts\Queue\Job as JobContract;
use Illuminate\Queue\Events\JobExceptionOccurred;
use Illuminate\Queue\Events\JobFailed;
use Illuminate\Queue\Events\JobProcessed;
use Illuminate\Queue\Events\JobProcessing;
use Illuminate\Support\Facades\Queue;
use Illuminate\Support\ServiceProvider;
use Moox\Jobs\Models\JobManager;

class JobManagerProvider extends ServiceProvider
{
Expand Down
Loading

0 comments on commit 9e6d764

Please sign in to comment.