{"id":13747298,"url":"https://github.com/linkyndy/pallets","last_synced_at":"2025-05-09T08:32:18.601Z","repository":{"id":33068418,"uuid":"55865304","full_name":"linkyndy/pallets","owner":"linkyndy","description":"Simple and reliable workflow engine, written in Ruby","archived":false,"fork":false,"pushed_at":"2022-06-05T00:59:04.000Z","size":279,"stargazers_count":232,"open_issues_count":4,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-05-13T21:05:37.489Z","etag":null,"topics":["ruby","workflow","workflow-engine"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linkyndy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"linkyndy"}},"created_at":"2016-04-09T20:23:00.000Z","updated_at":"2024-02-26T21:04:15.000Z","dependencies_parsed_at":"2022-08-26T10:30:45.052Z","dependency_job_id":null,"html_url":"https://github.com/linkyndy/pallets","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkyndy%2Fpallets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkyndy%2Fpallets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkyndy%2Fpallets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkyndy%2Fpallets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linkyndy","download_url":"https://codeload.github.com/linkyndy/pallets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224842669,"owners_count":17379009,"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":["ruby","workflow","workflow-engine"],"created_at":"2024-08-03T06:01:24.327Z","updated_at":"2024-11-15T20:31:30.267Z","avatar_url":"https://github.com/linkyndy.png","language":"Ruby","readme":"# Pallets\n\n[![Build Status](https://travis-ci.com/linkyndy/pallets.svg?branch=master)](https://travis-ci.com/linkyndy/pallets)\n\nSimple and reliable workflow engine, written in Ruby\n\n## It is plain simple!\n\n```ruby\n# my_workflow.rb\nrequire 'pallets'\n\nclass MyWorkflow \u003c Pallets::Workflow\n  task 'Foo'\n  task 'Bar' =\u003e 'Foo'\n  task 'Baz' =\u003e 'Foo'\n  task 'Qux' =\u003e ['Bar', 'Baz']\nend\n\nclass Foo \u003c Pallets::Task\n  def run\n    puts 'I love Pallets! \u003c3'\n  end\nend\n# [other task definitions are ommited, for now]\n\nMyWorkflow.new.run\n```\n\nThat's basically it! Curious for more? Read on or [check the examples](examples/)!\n\n\u003e Don't forget to run pallets, so it can process your tasks: `bundle exec pallets -r ./my_workflow`\n\n## Features\n\n* faaast!\n* reliable\n* retries failed tasks\n* Redis backend out of the box\n* JSON and msgpack serializers out of the box\n* Rails support\n* beautiful DSL\n* convention over configuration\n* thoroughly tested\n\n## Installation\n\n```\n# Gemfile\ngem 'pallets'\n\n# or\n\ngem install pallets\n```\n\n## Configuration\n\n```ruby\nPallets.configure do |c|\n  # How many workers to process incoming jobs?\n  c.concurrency = 2\n\n  c.backend = :redis\n  c.serializer = :json\n\n  c.backend_args = { db: 1 }\n\n  # What's the maximum allowed time to process a job?\n  c.job_timeout = 1800\n  # How many times should a job be retried?\n  c.max_failures = 3\nend\n```\n\nFor the complete set of options, see [pallets/configuration.rb](lib/pallets/configuration.rb)\n\n## Cookbook\n\n### DSL\n\nPallets is designed for developers' happiness. Its DSL aims to be as beautiful\nand readable as possible, while still enabling complex scenarios to be performed.\n\n```ruby\n# All workflows must subclass Pallets::Workflow\nclass WashClothes \u003c Pallets::Workflow\n  # The simplest task\n  task BuyDetergent\n\n  # Another task; since it has no dependencies, it will be executed in parallel\n  # with BuyDetergent\n  # TIP: Use a String argument when task is not _yet_ loaded\n  task 'BuySoftener'\n\n  # We're not doing it in real life, but we use it to showcase our first dependency!\n  task DilluteDetergent =\u003e BuyDetergent\n\n  # We're getting more complex here! This is the alternate way of defining\n  # dependencies (which can be several, by the way!). Choose the style that fits\n  # you best\n  task TurnOnWashingMachine, depends_on: [BuyDetergent, 'BuySoftener']\n\n  # Specify how many times a task is allowed to fail. If max_failures is reached\n  # the task is given up\n  task SelectProgram =\u003e TurnOnWashingMachine, max_failures: 2\nend\n\n# Every task must be a subclass of Pallets::Task\nclass BuyDetergent \u003c Pallets::Task\n  # Tasks must implement this method; here you can define whatever rocket science\n  # your task needs to perform!\n  def run\n    # ...do whatever...\n  end\nend\n\n# We're omitting the other task definitions for now; you shouldn't!\n```\n\n## Motivation\n\nThe main reason for Pallets' existence was the need of a fast, simple and reliable workflow engine, one that is easily extensible with various backends and serializer, one that does not lose your data and one that is intelligent enough to concurrently schedule a workflow's tasks.\n\n## Status\n\nPallets is under active development and it is not _yet_ production-ready.\n\n## How to contribute?\n\nAny contribution is **highly** appreciated! See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.\n\n## License\n\nSee [LICENSE](LICENSE)\n","funding_links":["https://github.com/sponsors/linkyndy"],"categories":["Ruby","Full fledged product"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkyndy%2Fpallets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinkyndy%2Fpallets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkyndy%2Fpallets/lists"}