{"id":19311066,"url":"https://github.com/boxuk/worker","last_synced_at":"2026-05-16T06:14:15.238Z","repository":{"id":7949268,"uuid":"9343830","full_name":"boxuk/worker","owner":"boxuk","description":"Concurrent task manager","archived":false,"fork":false,"pushed_at":"2013-05-27T21:38:15.000Z","size":126,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":50,"default_branch":"master","last_synced_at":"2025-01-06T02:12:20.951Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"doppleware/sampleShell","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boxuk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-10T10:38:32.000Z","updated_at":"2014-02-24T14:15:33.000Z","dependencies_parsed_at":"2022-09-05T22:50:16.610Z","dependency_job_id":null,"html_url":"https://github.com/boxuk/worker","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Fworker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Fworker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Fworker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxuk%2Fworker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boxuk","download_url":"https://codeload.github.com/boxuk/worker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240412104,"owners_count":19797207,"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":"2024-11-10T00:27:33.276Z","updated_at":"2026-05-16T06:14:10.200Z","avatar_url":"https://github.com/boxuk.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Worker - Simultaneous Tasks!\n\nThis is a dirt simple library that tries to use futures to manage identical simultaneous tasks.  The\nmotivation came from a JSON API app that could have potentially lengthy (5-10 second) requests to a\nbackend server that would produce identical results if all issued around the same time.  Worker\nallows them to be handled as a single task.\n\n## Usage\n\nYou can install Worker via [Clojars](https://clojars.org/boxuk/worker).\n\n```clojure\n(:use [worker.core :only [worker]])\n\n(worker\n  \"a unique id\"\n  (my-long-running-task 1 2 3))\n```\n\nThis will use the unique ID specified to check if this task is already running. If it isn't then it'll\ncreate a future and store it, then blocking for the result.\n\nWhen another request comes in, if this task is still running it'll then just block on the same future.\nBoth tasks will then be returned together and the future forgotten.\n\n## Task IDs\n\nThe task ID used above was a string, but you can use vectors as well.\n\n```clojure\n(worker [:foo :bar :baz]\n  (some-task))\n```\n\nThis is available for extension via a multimethod.\n\n```clojure\n(defmulti make-id class)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxuk%2Fworker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboxuk%2Fworker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxuk%2Fworker/lists"}