{"id":18029084,"url":"https://github.com/jessiahr/bolt","last_synced_at":"2025-03-27T03:30:55.453Z","repository":{"id":57480171,"uuid":"96479082","full_name":"jessiahr/bolt","owner":"jessiahr","description":"A fast and fault tolerant job queue written in elixir.","archived":false,"fork":false,"pushed_at":"2018-02-01T19:17:06.000Z","size":380,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-14T18:18:42.655Z","etag":null,"topics":["elixir","job-queue","otp","redis"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/jessiahr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-06T23:08:32.000Z","updated_at":"2024-03-14T18:18:42.656Z","dependencies_parsed_at":"2022-09-26T17:41:37.060Z","dependency_job_id":null,"html_url":"https://github.com/jessiahr/bolt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessiahr%2Fbolt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessiahr%2Fbolt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessiahr%2Fbolt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessiahr%2Fbolt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jessiahr","download_url":"https://codeload.github.com/jessiahr/bolt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245778387,"owners_count":20670682,"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":["elixir","job-queue","otp","redis"],"created_at":"2024-10-30T09:07:55.016Z","updated_at":"2025-03-27T03:30:54.983Z","avatar_url":"https://github.com/jessiahr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"  # Bolt\n\n[![Build Status](https://travis-ci.org/jessiahr/bolt.svg?branch=master)](https://travis-ci.org/jessiahr/bolt)\n[![Hex.pm](https://img.shields.io/hexpm/v/bolt.svg)](https://hex.pm/packages/bolt)\n\n\nA simple job queue using OTP.\n\n\n![](https://media.giphy.com/media/3o7TKxJRKk8uPOOdgY/giphy.gif)\n\n\n## Installation\n\n```elixir\ndef deps do\n  [{:bolt, \"~\u003e 0.1.9\"}]\nend\n```\n## Usage\n\nFor more detail see the [documentation](http://hexdocs.pm/bolt).\n\n### Configure Queues\n```elixir\n#config.ex\n  config :bolt,\n    queues: [{:main, SomeApp.SomeWorker, 10}, {:bg, SomeApp.SomeWorker, 2}],\n    redis_url: \"redis://localhost:6379\",\n    port: 3000\n```\n\n### Define a Worker\n```elixir\n  defmodule SomeApp.SomeWorker do\n    @behaviour Bolt.Worker\n    def work(params) do\n      #Do some work!\n    end\n  end\n```\n\n\n### Enqueue Jobs\n```elixir\n      # Add a single job to the :bg queue\n      iex\u003e Bolt.enqueue(:bg, %{\"somefield\" =\u003e 1})\n      {:ok, [1, 1]}\n\n      # Add a collection of jobs to the :bg queue\n      iex\u003e Bolt.enqueue(:bg, [%{\"somefield\" =\u003e 1}, %{\"somefield\" =\u003e 1}])\n      [{:ok}]\n```\n\n### Manage Queues\n```elixir\n      # Change worker pools\n      iex\u003e Bolt.Queue.set_worker_max(:bg, 5) \n      :ok\n\n      # Pause a queue\n      iex\u003e Bolt.Queue.set_worker_max(:bg, 0) \n      :ok\n```\n\n\n### Web UI\nTo use the web interface forward to bolt from your router:\n\n```elixir\nforward \"/bolt\", to: Bolt.Router\n```\nGo to `/bolt` to see the dashboard app\n\n\n### Use The API\n`GET localhost:3000/` change the port by setting in config or set to nil to disable endpoint.\n```json\n[\n  {\n    \"workers\": [],\n    \"worker_max\": 1,\n    \"status\": \"running\",\n    \"queue_name\": \"main\",\n    \"jobs_remaining\": 0\n  },\n  {\n    \"workers\": [\n      {\n        \"status\": \"finished\",\n        \"started_at\": \"2017-07-08T00:04:49.773760Z\",\n        \"job_id\": \"bg:jobs:id69050946-636e-11e7-bd14-784f437e1c56\"\n      }\n    ],\n    \"worker_max\": 1,\n    \"status\": \"running\",\n    \"queue_name\": \"bg\",\n    \"jobs_remaining\": 167804\n  }\n]\n```\n\n\n![](https://d26dzxoao6i3hh.cloudfront.net/items/0r190p3q22432L3q1h2V/Screen%20Shot%202017-07-19%20at%201.36.29%20PM.png)\n\n\n### Todo\n* More Test Coverage\n* More Docs","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessiahr%2Fbolt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjessiahr%2Fbolt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessiahr%2Fbolt/lists"}