• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

examples/H03-May-2022-280214

lib/H10-Jun-2021-6,3111,982

t/H10-Jun-2021-1,8941,719

.perltidyrcH A D30-May-2020532 1514

ChangesH A D10-Jun-202125.6 KiB679523

LICENSEH A D13-May-20208.8 KiB202151

MANIFESTH A D10-Jun-20213.9 KiB8382

MANIFEST.SKIPH A D25-Mar-2021120 1110

META.jsonH A D10-Jun-20211.5 KiB6463

META.ymlH A D10-Jun-2021895 3534

Makefile.PLH A D10-Jun-20211.1 KiB3430

README.mdH A D24-Apr-20212 KiB5133

README.md

1
2# Minion [![](https://github.com/mojolicious/minion/workflows/linux/badge.svg)](https://github.com/mojolicious/minion/actions)
3
4![Screenshot](https://raw.github.com/mojolicious/minion/main/examples/admin.png?raw=true)
5
6  A high performance job queue for the Perl programming language, with support for multiple named queues, priorities,
7  high priority fast lane, delayed jobs, job dependencies, job progress, job results, retries with backoff, rate
8  limiting, unique jobs, expiring jobs, statistics, distributed workers, parallel processing, autoscaling, remote
9  control, [Mojolicious](https://mojolicious.org) admin ui, resource leak protection and multiple backends (such as
10  [PostgreSQL](https://www.postgresql.org)).
11
12  Job queues allow you to process time and/or computationally intensive tasks in background processes, outside of the
13  request/response lifecycle of web applications. Among those tasks you'll commonly find image resizing, spam filtering,
14  HTTP downloads, building tarballs, warming caches and basically everything else you can imagine that's not super fast.
15
16```perl
17use Mojolicious::Lite -signatures;
18
19plugin Minion => {Pg => 'postgresql://postgres@/test'};
20
21# Slow task
22app->minion->add_task(slow_log => sub ($job, $msg) {
23  sleep 5;
24  $job->app->log->debug(qq{Received message "$msg"});
25});
26
27# Perform job in a background worker process
28get '/log' => sub ($c) {
29  $c->minion->enqueue(slow_log => [$c->param('msg') // 'no message']);
30  $c->render(text => 'Your message will be logged soon.');
31};
32
33app->start;
34```
35
36  Just start one or more background worker processes in addition to your web server.
37
38    $ ./myapp.pl minion worker
39
40## Installation
41
42  All you need is a one-liner, it takes less than a minute.
43
44    $ curl -L https://cpanmin.us | perl - -M https://cpan.metacpan.org -n Minion
45
46  We recommend the use of a [Perlbrew](http://perlbrew.pl) environment.
47
48## Want to know more?
49
50  Take a look at our excellent [documentation](https://mojolicious.org/perldoc/Minion/Guide)!
51