{"id":13483809,"url":"https://github.com/bmulvihill/dispatch","last_synced_at":"2025-03-27T15:30:33.933Z","repository":{"id":74011457,"uuid":"75032663","full_name":"bmulvihill/dispatch","owner":"bmulvihill","description":"Dispatch - in memory asynchronous job processing","archived":false,"fork":false,"pushed_at":"2024-01-09T16:44:21.000Z","size":21,"stargazers_count":32,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-30T17:48:18.250Z","etag":null,"topics":["concurrency","crystal","job-queue"],"latest_commit_sha":null,"homepage":"","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bmulvihill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-29T02:01:39.000Z","updated_at":"2022-08-12T16:03:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"7e179dea-1247-4a44-8878-b1de5535180f","html_url":"https://github.com/bmulvihill/dispatch","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmulvihill%2Fdispatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmulvihill%2Fdispatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmulvihill%2Fdispatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmulvihill%2Fdispatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmulvihill","download_url":"https://codeload.github.com/bmulvihill/dispatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245871682,"owners_count":20686246,"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":["concurrency","crystal","job-queue"],"created_at":"2024-07-31T17:01:15.491Z","updated_at":"2025-03-27T15:30:33.569Z","avatar_url":"https://github.com/bmulvihill.png","language":"Crystal","funding_links":[],"categories":["Queues and Messaging"],"sub_categories":[],"readme":"# Dispatch [![Build Status](https://travis-ci.org/bmulvihill/dispatch.svg?branch=master)](https://travis-ci.org/bmulvihill/dispatch)\n\n\n### In-memory job queuing\n```crystal\n# example.cr\nrequire \"./src/dispatch\"\n\nDispatch.configure do |config|\n  config.num_workers = 5\n  config.queue_size = 10\n  config.logger = Logger.new(IO::Memory.new)\nend\n\nclass FakeJob\n  include Dispatchable\n\n  def perform(name)\n    p \"#{Time.now}: Hello, #{name}\"\n  end\nend\n\nclass ErrorJob\n  include Dispatchable\n\n  def perform\n    raise \"Hello!\"\n  end\nend\n\nDispatch.config # =\u003e \u003cDispatch::Configuration:0x1042dafb0 @num_workers=5, @queue_size=10\u003e\nFakeJob.dispatch(\"Bob\")\nFakeJob.dispatch(\"Emily\")\nFakeJob.dispatch_in(5.seconds, \"Billy\")\nFakeJob.dispatch(\"Maddy\")\n\nErrorJob.dispatch\n\nDispatch.successes # =\u003e 0\n\nsleep 6\n\nDispatch.successes # =\u003e 4\nDispatch.failures # =\u003e 1\n```\n\nOutput:\n```\n\"2016-12-13 14:23:53 -0500: Hello, Bob\"\n\"2016-12-13 14:23:53 -0500: Hello, Emily\"\n\"2016-12-13 14:23:53 -0500: Hello, Maddy\"\n\"2016-12-13 14:23:58 -0500: Hello, Billy\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmulvihill%2Fdispatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmulvihill%2Fdispatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmulvihill%2Fdispatch/lists"}