Skip to content
Projetos

Sobre

:octopus: Perl high performance job queue

Dados e análise

Como estes números são medidos

Crescimento medido de estrelas

em 24 h
0
em 7 dias
0
em 15 dias
0
em 1 mês
Coletando histórico

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

Screenshot

A high performance job queue for the Perl programming language. Also available for Node.js.

Minion comes with support for multiple named queues, priorities, high priority fast lane, delayed jobs, cron style recurring jobs, job dependencies, job progress, job results, retries with backoff, rate limiting, unique jobs, expiring jobs, statistics, distributed workers, parallel processing, autoscaling, remote control, Mojolicious admin ui, resource leak protection and multiple backends (such as PostgreSQL).

Job queues allow you to process time and/or computationally intensive tasks in background processes, outside of the request/response lifecycle of web applications. Among those tasks you'll commonly find image resizing, spam filtering, HTTP downloads, building tarballs, warming caches and basically everything else you can imagine that's not super fast.

use Mojolicious::Lite -signatures;

plugin Minion => {Pg => 'postgresql://postgres@/test'};

# Slow task
app->minion->add_task(slow_log => sub ($job, $msg) {
  sleep 5;
  $job->app->log->debug(qq{Received message "$msg"});
});

# Perform job in a background worker process
get '/log' => sub ($c) {
  $c->minion->enqueue(slow_log => [$c->param('msg') // 'no message']);
  $c->render(text => 'Your message will be logged soon.');
};

app->start;

Just start one or more background worker processes in addition to your web server.

$ ./myapp.pl minion worker

Installation

All you need is a one-liner, it takes less than a minute.

$ curl -L https://cpanmin.us | perl - -M https://cpan.metacpan.org -n Minion

We recommend the use of a Perlbrew environment.

Development

The admin ui is a Vue.js app in assets, which gets built with Vite. Built files are committed to the repository, so installing Minion never requires Node.js. After making changes to the admin ui, just rebuild the assets and commit them together with your changes.

$ npm ci
$ npm run build

Use npm run watch to rebuild automatically and npm run lint to check your code style. The admin ui also has its own browser tests, which require a PostgreSQL database and Playwright.

$ npx playwright install chromium
$ TEST_ONLINE=postgresql://postgres@/test prove -l t t/*.t.js

Want to know more?

Take a look at our excellent documentation!

Explore projetos relacionados

Carregando…