-
-
08 Mar 2019 03:07:02 UTC
- Distribution: Beam-Minion
- Module version: 0.016
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (0)
- Testers (303 / 0 / 8)
- Kwalitee
Bus factor: 1- 93.72% Coverage
- License: perl_5
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (26.82KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Beam::Minion::Util - Utility functions for Beam::Minion
VERSION
version 0.016
SYNOPSIS
use Beam::Minion::Util qw( minion ); my $minion = minion(); my %attrs = minion_attrs();
DESCRIPTION
This module contains helper routines for Beam::Minion.
SUBROUTINES
minion_init_args
my %args = minion_init_args();
Get the arguments needed to initialize a new Minion instance by parsing the
BEAM_MINION
environment variable.This environment variable can take a few forms:
- <url>
-
A simple backend URL like
postgres://postgres@/test
,sqlite:/tmp/minion.db
,mongodb://127.0.0.1:27017
, ormysql://user@127.0.0.1/minion
. The following backends are supported: Minion::Backend::SQLite, Minion::Backend::Pg, Minion::Backend::MongoDB, Minion::Backend::mysql. - <backend>+<url>
-
A backend name and arguments, separated by
+
, likeStorable+/tmp/minion.db
. Any backend may be used this way.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
minion
my $minion = minion();
Get a Minion instance as configured by the
BEAM_MINION
environment variable (parsed by "minion_init_args").build_mojo_app
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.
SEE ALSO
AUTHOR
Doug Bell <preaction@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2018 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.
Module Install Instructions
To install Beam::Minion, copy and paste the appropriate command in to your terminal.
cpanm Beam::Minion
perl -MCPAN -e shell install Beam::Minion
For more information on module installation, please visit the detailed CPAN module installation guide.