Giter Site home page Giter Site logo

croustibat / filament-jobs-monitor Goto Github PK

View Code? Open in Web Editor NEW
110.0 110.0 29.0 95 KB

Queue Monitoring Package for Filament

Home Page: https://filamentphp.com/plugins/jobs-monitor

License: MIT License

PHP 97.70% JavaScript 2.30%
filamentphp laravel

filament-jobs-monitor's Introduction

Hi there πŸ‘‹

Baptiste Bouillot

  • Software Crafter, PHP & Laravel specialist
  • ex CTO @ Dernier Cri
  • Co-founder @ MatiΓ¨re Noire (web & mobile & iot agency)
  • Software Architect, co-creator of Deezer R&D, @ Deezer

filament-jobs-monitor's People

Contributors

acepoblete avatar amendozaaguiar avatar bcollins-oxford avatar cntabana avatar croustibat avatar dependabot[bot] avatar github-actions[bot] avatar klham avatar log1x avatar mrwouternl avatar musilondrej avatar mvenghaus avatar zereliq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

filament-jobs-monitor's Issues

Unable to prune

php artisan model:prune --model=QueueMonitor

   ErrorException 

  Class "Croustibat\FilamentJobsMonitor\QueueMonitorProvider\Facade" not found

  at vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php:80
     76β–•             return true;
     77β–•         }
     78β–• 
     79β–•         if (isset($this->aliases[$alias])) {
  ➜  80β–•             return class_alias($this->aliases[$alias], $alias);
     81β–•         }
     82β–•     }
     83β–• 
     84β–•     /**

I was able to prune by creating a new QueueMonitorPruning model and extending QueueMonitor. I'm unsure if I'm missing something but it doesn't seem like it's happy with pruning using a model in the vendor folder. Could be associated with artisan not finding the model?

package not working well with filament v3

am getting this error Class "App\Filament\Resources\CustomJobMonitorResource" not found

These are the steps i followed
composer require croustibat/filament-jobs-monitor
php artisan vendor:publish --tag="filament-jobs-monitor-migrations"
php artisan migrate
php artisan vendor:publish --tag="filament-jobs-monitor-config"
Then i whent to providers/filament/AppPanelProvider.php

and i added there this on the chain ->plugins([
\Croustibat\FilamentJobsMonitor\FilamentJobsMonitorPlugin::make()
->label('Job')
->pluralLabel('Jobs')
->enableNavigation(true)
->navigationIcon('heroicon-o-cpu-chip')
->navigationGroup('Settings')
->navigationSort(5)
->navigationCountBadge(true)
->enablePruning(true)
->pruningRetention(7)
->resource(\App\Filament\Resources\CustomJobMonitorResource::class)
]) but after running my program that was working fine its now just crashing please help me guys this is the error am getting Class "App\Filament\Resources\CustomJobMonitorResource" not found and its referencing to this file providers/filament/AppPanelProvider.php meaning the way u guys are telling us to register the plugin basing on your documentation has a problem ->plugins([
\Croustibat\FilamentJobsMonitor\FilamentJobsMonitorPlugin::make()
->label('Job')
->pluralLabel('Jobs')
->enableNavigation(true)
->navigationIcon('heroicon-o-cpu-chip')
->navigationGroup('Settings')
->navigationSort(5)
->navigationCountBadge(true)
->enablePruning(true)
->pruningRetention(7)
->resource(\App\Filament\Resources\CustomJobMonitorResource::class)

Poor documentation

Hi

I cant make this plugin work in my project. Can you provide a more accurate documentation about setup, code examples?

If i set .env parameter:
QUEUE_CONNECTION=database
the queue column still shows sync.

The progress also not work, even i set $this->setProgress(10);

What am i doing wrong?

Thanks!
Z

Code:

ImportDevice::dispatch($record);

class ImportDevice implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, QueueProgress, SerializesModels;

    protected $data;

    /**
     * Create a new job instance.
     */
    public function __construct($data)
    {
        $this->data = $data;
    }

    /**
     * Execute the job.
     */
    public function handle(): void
    {
        $this->setProgress(10);
        Log::info("Import 10%");
        sleep(3);
        // Run import in Helper for device
        //Helper::import($this->data->name, $this->data->ip, $this->data->user, $this->data->password, $this->data->port, 'import');
        $this->setProgress(50);
        Log::info("Import 50%");
        sleep(3);
        $this->setProgress(100);
        Log::info("Import 100%");

        // release job 
        $this->release();
    }
}

Result:
Status is alway Running, but the jobs are done.
Screenshot 2024-02-01 at 13 38 39

Sortable (Bug/Request)

According to the last update we should have ->sortable() and default sort ->defaultSort('started_at', 'desc'); but unfortunately this has been applied to the form and not the table. Also im missing the completed_at column on the table.

(Sortable to all columns would be nice)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.