{"id":27197676,"url":"https://github.com/preaction/beam-minion","last_synced_at":"2025-04-09T20:29:20.731Z","repository":{"id":56832692,"uuid":"78058581","full_name":"preaction/Beam-Minion","owner":"preaction","description":"A distributed task runner using Beam and Minion","archived":false,"fork":false,"pushed_at":"2019-03-08T03:06:11.000Z","size":94,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-19T02:05:02.927Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/preaction.png","metadata":{"files":{"readme":"README.mkdn","changelog":"CHANGES","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-04T22:35:37.000Z","updated_at":"2019-07-09T09:20:28.000Z","dependencies_parsed_at":"2022-09-08T05:11:25.626Z","dependency_job_id":null,"html_url":"https://github.com/preaction/Beam-Minion","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FBeam-Minion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FBeam-Minion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FBeam-Minion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FBeam-Minion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preaction","download_url":"https://codeload.github.com/preaction/Beam-Minion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248106792,"owners_count":21048796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-09T20:29:20.129Z","updated_at":"2025-04-09T20:29:20.709Z","avatar_url":"https://github.com/preaction.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nBeam::Minion - A distributed task runner for Beam::Wire containers\n\n# VERSION\n\nversion 0.016\n\n# STATUS\n\n\u003ca href=\"https://travis-ci.org/preaction/Beam-Minion\"\u003e\u003cimg src=\"https://travis-ci.org/preaction/Beam-Minion.svg?branch=master\"\u003e\u003c/a\u003e\u003ca href=\"https://coveralls.io/r/preaction/Beam-Minion\"\u003e\u003cimg src=\"https://coveralls.io/repos/preaction/Beam-Minion/badge.png\" alt=\"Coverage Status\" /\u003e\u003c/a\u003e\n\n# SYNOPSIS\n\n    # Command-line interface\n    export BEAM_MINION=sqlite://test.db\n    beam minion worker\n    beam minion run \u003ccontainer\u003e \u003cservice\u003e [\u003cargs\u003e...]\n    beam minion help\n\n    # Perl interface\n    local $ENV{BEAM_MINION} = 'sqlite://test.db';\n    Beam::Minion-\u003eenqueue( $container, $service, \\@args, \\%opt );\n\n# DESCRIPTION\n\n[Beam::Minion](https://metacpan.org/pod/Beam::Minion) is a distributed task runner. One or more workers are\ncreated to run tasks, and then each task is sent to a worker to be run.\nTasks are configured as [Beam::Runnable](https://metacpan.org/pod/Beam::Runnable) objects by [Beam::Wire](https://metacpan.org/pod/Beam::Wire)\ncontainer files.\n\n# SUBROUTINES\n\n## enqueue\n\n    Beam::Minion-\u003eenqueue( $container_name, $task_name, \\@args, \\%opt );\n\nEnqueue the task named `$task_name` from the container named `$container_name`.\nThe `BEAM_MINION` environment variable must be set.\n\n`\\%opt` is a hash reference with the following keys:\n\n- attempts\n\n    Number of times to retry this job if it fails. Defaults to `1`.\n\n- delay\n\n    Time (in seconds) to delay this job (from now). Defaults to `0`.\n\n- priority\n\n    The job priority. Higher priority jobs get performed first. Defaults to `0`.\n\n(These are the same options allowed in [the Minion \"enqueue\"\nmethod](http://mojolicious.org/perldoc/Minion#enqueue1))\n\n# GETTING STARTED\n\n## Configure Minion\n\nTo start running your [Beam::Runner](https://metacpan.org/pod/Beam::Runner) jobs, you must first start\na [Minion](https://metacpan.org/pod/Minion) worker with the [beam minion\nworker.command](https://metacpan.org/pod/Beam::Minion::Command::worker).  Minion requires\na database to coordinate workers, and communicates with this database\nusing a [Minion::Backend](https://metacpan.org/pod/Minion::Backend).\n\nThe supported Minion backends are:\n\n- [Minion::Backend::SQLite](https://metacpan.org/pod/Minion::Backend::SQLite) - `sqlite:\u003cdb_path\u003e`\n- [Minion::Backend::Pg](https://metacpan.org/pod/Minion::Backend::Pg) - `postgresql://\u003cuser\u003e:\u003cpass\u003e@\u003chost\u003e/\u003cdatabase\u003e`\n- [Minion::Backend::mysql](https://metacpan.org/pod/Minion::Backend::mysql) - `mysql://\u003cuser\u003e:\u003cpass\u003e@\u003chost\u003e/\u003cdatabase\u003e`\n- [Minion::Backend::MongoDB](https://metacpan.org/pod/Minion::Backend::MongoDB) - `mongodb://\u003chost\u003e:\u003cport\u003e`\n\nOnce you've picked a database backend, configure the `BEAM_MINION`\nenvironment variable with the URL. Minion will automatically deploy the\ndatabase tables it needs, so be sure to allow the right permissions (if\nthe database has such things).\n\nIn order to communicate with Minion workers on other machines, it will\nbe necessary to use a database accessible from the network (so, not\nSQLite).\n\n## Start a Worker\n\nOnce the `BEAM_MINION` environment variable is set, you can start\na worker with `beam minion worker`. Each worker can run jobs from\nall the containers it can find from the `BEAM_PATH` environment\nvariable. Each worker will run up to 4 jobs concurrently.\n\n## Spawn a Job\n\nJobs are spawned with `beam minion run \u003ccontainer\u003e \u003cservice\u003e`.\nThe `service` must be an object that consumes the [Beam::Runnable](https://metacpan.org/pod/Beam::Runnable)\nrole. `container` should be a path to a container file and can be\nan absolute path, a path relative to the current directory, or a\npath relative to one of the paths in the `BEAM_PATH` environment\nvariable (separated by `:`).\n\nYou can queue up jobs before you have workers running. As soon as\na worker is available, it will start running jobs from the queue.\n\n# SEE ALSO\n\n[Beam::Wire](https://metacpan.org/pod/Beam::Wire), [Beam::Runner](https://metacpan.org/pod/Beam::Runner), [Minion](https://metacpan.org/pod/Minion)\n\n# AUTHOR\n\nDoug Bell \u003cpreaction@cpan.org\u003e\n\n# CONTRIBUTOR\n\nMohammad S Anwar \u003cmohammad.anwar@yahoo.com\u003e\n\n# COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2018 by Doug Bell.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreaction%2Fbeam-minion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreaction%2Fbeam-minion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreaction%2Fbeam-minion/lists"}