linkorb / commando
Commando: Execute Commands from Queues
Installs: 162
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 5
Forks: 1
Open Issues: 5
Type:application
Requires
- andrewfenn/pid-helper: 0.1.0
- hipchat/hipchat-php: ^1.0
- linkorb/autotune: ^1.2
- maknz/slack: ^1.7
- nyholm/psr7: ^1.1
- psr/http-client: ^1.0
- symfony/console: ^2.7|^3.0|^4.0
- symfony/event-dispatcher: ^2.7|^3.0|^4.0
- symfony/http-client: ^4.3
- symfony/process: ^2.7|^3.0|^4.0
- symfony/yaml: ^2.7|^3.0|^4.0
- zordius/lightncandy: ~0.93
- dev-master
- v1.14.0
- 1.11.1
- 1.11.0
- 1.10.0
- v1.9.0
- v1.8.0
- v1.7.0
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.0
- v1.2.1
- v1.1.0
- v1.0.1
- v1.0.0
- dev-dependabot/npm_and_yarn/lodash-and-lodash-and-commitlint/cli-4.17.21
- dev-dependabot/composer/guzzlehttp/guzzle-6.5.8
- dev-dependabot/composer/guzzlehttp/psr7-1.8.5
- dev-dependabot/npm_and_yarn/shelljs-0.8.5
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
This package is auto-updated.
Last update: 2024-10-25 09:05:54 UTC
README
Commando is a generic job-runner.
You can define your own commands in Json or Yaml files, and process jobs from different stores such as a directory of files, or a database.
It's goal is to make it easy to implement background jobs into your application.
An example workflow:
- You define a command "hello" in
commando.yml
:
commands: hello: template: echo "Hello {{ greeted }}" inputs: greeted: default: world
- Your app writes a job into
/your/commando-path/new
called1.json
:
{ "command": "hello", "inputs": { "greeted": "universe" } }
- You (or cron) runs
commando run
. - Commando will check for new job files in the configured store (in this case a directory), execute the command, replacing arguments in the template with the
passed job arguments, finally executing
echo "Hello universe"
- Commando reports the job status back to the store, including exit codes, start/end times, total duration, and stdout and stderr
- Your app reports back to the user if needed, based on the status report.
Stores:
JsonDirJobStore
: Manages jobs through json files with a simple directory structurePdoJobStore
: Manages jobs through a database tableCamundaJobStore
: Camunda External Task client
Use-cases
You can replace the template
with much more complex command-lines or shell-scripts.
Your app should treat these jobs as "fire-and-forget", meaning the app should not block, waiting for response. It's most ideal in scenarios where your triggers commands and doesn't need to know about the response right away:
Examples:
- Update PDFs or reports in the background
- Send emails and notifications
- Create a database backup
- Process uploaded image files
- ...etc
Conventional Commits
This repository is using Conventional Commits
Please run npm install
at least once, in order to install the appropriate tooling and git hooks (this helps you to follow the conventions by linting them before actually committing).
In short: you should prefix your commit titles with the correct type (i.e. feat: my new cool feature
). This helps to create clear commit histories, automatically handles semver, tagging and CHANGELOG.md generation.
If you'd like to reference a card in our planning system, simply add a #123
to the end of your commit title. The card will be correctly linked from the changelogs etc.
To publish a new release, simply run npm run publish
. This will update the changelog, and manifests like composer.json, package.json, etc to a new tag. The tag follows Semver, and is selected based on your commit types since the last release.
License
Please refer to the included LICENSE.md file
Brought to you by the LinkORB Engineering team
Check out our other projects at engineering.linkorb.com.
Btw, we're hiring!