mojolicious/minion
Fork: 56 Star: 227 (更新于 2024-11-19 19:01:02)
license: Artistic-2.0
Language: Perl .
:octopus: Perl high performance job queue
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, 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.
Want to know more?
Take a look at our excellent documentation!
最近版本更新:(数据更新于 2024-09-03 01:41:39)
主题(topics):
job-queue, mojolicious, perl, postgresql
mojolicious/minion同语言 Perl最近更新仓库
2024-09-25 06:00:29 AuxXxilium/arc-addons
2024-08-27 19:51:43 fxcoudert/gfortran-for-macOS
2024-08-21 21:20:46 cowsay-org/cowsay
2024-08-06 16:54:08 major/MySQLTuner-perl
2022-05-22 17:20:36 holzschu/a-shell
2019-02-25 00:03:35 jfcoz/postgresqltuner