Beam::Minion::Util - Utility functions for Beam::Minion
version 0.012
use Beam::Minion::Util qw( minion ); my $minion = minion(); my %attrs = minion_attrs();
This module contains helper routines for Beam::Minion.
my %args = minion_init_args();
Get the arguments needed to initialize a new Minion instance by parsing the BEAM_MINION environment variable.
BEAM_MINION
This environment variable can take a few forms:
A simple backend URL like postgres://postgres@/test, sqlite:/tmp/minion.db, mongodb://127.0.0.1:27017, or mysql://user@127.0.0.1/minion. The following backends are supported: Minion::Backend::SQLite, Minion::Backend::Pg, Minion::Backend::MongoDB, Minion::Backend::mysql.
postgres://postgres@/test
sqlite:/tmp/minion.db
mongodb://127.0.0.1:27017
mysql://user@127.0.0.1/minion
A backend name and arguments, separated by +, like Storable+/tmp/minion.db. Any backend may be used this way.
+
Storable+/tmp/minion.db
If your backend requires more arguments, you can separate them with +:
# Configure the MySQL backend with a DBI DSN BEAM_MINION=mysql+dsn+dbi:mysql:minion
my $minion = minion();
Get a Minion instance as configured by the BEAM_MINION environment variable (parsed by "minion_init_args").
Build the Mojolicious app that contains the Minion plugin (Mojolicious::Plugin::Minion) and tasks. This can then be given to one of the Minion::Command classes to execute commands.
Beam::Minion
Doug Bell <preaction@cpan.org>
This software is copyright (c) 2017 by Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Beam::Minion, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Beam::Minion
CPAN shell
perl -MCPAN -e shell install Beam::Minion
For more information on module installation, please visit the detailed CPAN module installation guide.