No description
This repository has been archived on 2026-08-22. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Henning Thorsen d8ec6f79c6 ev
2015-10-15 15:17:53 +02:00
lib ev 2015-10-15 15:17:53 +02:00
t ev 2015-10-15 15:17:53 +02:00
.gitignore updated .gitignore file 2014-08-21 18:04:30 +02:00
.perltidyrc Add .perltidyrc 2015-10-15 13:40:26 +02:00
.travis.yml use a newer version of PostgreSQL 2015-09-28 21:10:13 +02:00
Changes bump version 2015-10-15 12:39:47 +02:00
CONTRIBUTING.md first commit 2014-03-27 20:06:21 +01:00
LICENSE first commit 2014-03-27 20:06:21 +01:00
Makefile.PL use consistent line length 2015-08-29 01:41:26 +02:00
MANIFEST.SKIP first commit 2014-03-27 20:06:21 +01:00
README.md use more generic examples 2015-03-08 00:51:44 +01:00

Minion Build Status

A job queue for the Mojolicious real-time web framework with support for multiple backends, such as DBM::Deep and PostgreSQL.

use Mojolicious::Lite;
use 5.20.0;
use experimental 'signatures';

plugin Minion => {File => '/home/sri/minion.db'};

# 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 oneliner, 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.