GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MOJOLICIOUS::PLUGIN::MINION (3)

.ds Aq ’

NAME

Mojolicious::Plugin::Minion - Minion job queue plugin

CONTENTS

SYNOPSIS



  # Mojolicious (choose a backend)
  $self->plugin(Minion => {Pg => postgresql://postgres@/test});

  # Mojolicious::Lite (choose a backend)
  plugin Minion => {Pg => postgresql://postgres@/test};

  # Add tasks to your application
  app->minion->add_task(slow_log => sub {
    my ($job, $msg) = @_;
    sleep 5;
    $job->app->log->debug(qq{Received message "$msg"});
  });

  # Start jobs from anywhere in your application
  $c->minion->enqueue(slow_log => [test 123]);

  # Perform jobs in your tests
  $t->get_ok(/start_slow_log_job)->status_is(200);
  $t->get_ok(/start_another_job)->status_is(200);
  $t->app->minion->perform_jobs;



DESCRIPTION

Mojolicious::Plugin::Minion is a Mojolicious plugin for the Minion job queue.

HELPERS

Mojolicious::Plugin::Minion implements the following helpers.

    minion



  my $minion = $app->minion;
  my $minion = $c->minion;



Get Minion object for application.



  # Add job to the queue
  $c->minion->enqueue(foo => [bar, baz]);

  # Perform jobs for testing
  $app->minion->perform_jobs;



METHODS

Mojolicious::Plugin::Minion inherits all methods from Mojolicious::Plugin and implements the following new ones.

    register



  $plugin->register(Mojolicious->new, {Pg => postgresql://postgres@/test});



Register plugin in Mojolicious application.

SEE ALSO

Minion, Mojolicious::Guides, <http://mojolicious.org>.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MOJOLICIOUS::PLUGIN::MINION (3) 2016-01-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.