{"id":16660971,"url":"https://github.com/agrafix/batch","last_synced_at":"2026-04-20T08:33:39.099Z","repository":{"id":59151087,"uuid":"119147004","full_name":"agrafix/batch","owner":"agrafix","description":"Haskell: Simplify queuing up data and processing it in batch.","archived":false,"fork":false,"pushed_at":"2018-01-27T08:32:12.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-12T04:06:11.850Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agrafix.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","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":"2018-01-27T08:29:25.000Z","updated_at":"2020-01-20T02:08:58.000Z","dependencies_parsed_at":"2022-09-14T04:01:04.108Z","dependency_job_id":null,"html_url":"https://github.com/agrafix/batch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/agrafix/batch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Fbatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Fbatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Fbatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Fbatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agrafix","download_url":"https://codeload.github.com/agrafix/batch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2Fbatch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32040241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-12T10:32:44.777Z","updated_at":"2026-04-20T08:33:39.062Z","avatar_url":"https://github.com/agrafix.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# batch\n\n[![CircleCI](https://circleci.com/gh/agrafix/batch.svg?style=svg)](https://circleci.com/gh/agrafix/batch)\n\nSimplify queuing up data and processing it in batch.\n\n```haskell\nimport Control.Batch\nimport Control.Concurrent.STM\nimport Control.Monad\n\nexample :: IO ()\nexample =\n  do outVar \u003c- atomically $ newTVar []\n     let cfg =\n             Batch\n             { b_runEveryItems = Just 5\n             , b_runAfterTimeout = Nothing\n             , b_maxQueueLength = Nothing\n             , b_runBatch =\n                     \\x -\u003e atomically $ modifyTVar' outVar (++x)\n             }\n     withBatchRunner cfg $ \\hdl -\u003e\n         do replicateM_ 5 $ bh_enqueue hdl True\n            out \u003c-\n                atomically $\n                do x \u003c- readTVar outVar\n                   when (length x /= 5) retry\n                   pure x\n            out `shouldBe` [True, True, True, True, True]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrafix%2Fbatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagrafix%2Fbatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrafix%2Fbatch/lists"}