{"id":47695837,"url":"https://github.com/sbsoftware/crumble-jobs","last_synced_at":"2026-04-02T16:25:07.771Z","repository":{"id":344045455,"uuid":"1150057609","full_name":"sbsoftware/crumble-jobs","owner":"sbsoftware","description":"Background job runner integration for the crumble framework","archived":false,"fork":false,"pushed_at":"2026-03-20T16:36:18.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-21T08:04:39.222Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Crystal","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/sbsoftware.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-04T20:43:44.000Z","updated_at":"2026-03-20T16:36:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sbsoftware/crumble-jobs","commit_stats":null,"previous_names":["sbsoftware/crumble-jobs"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sbsoftware/crumble-jobs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbsoftware%2Fcrumble-jobs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbsoftware%2Fcrumble-jobs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbsoftware%2Fcrumble-jobs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbsoftware%2Fcrumble-jobs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbsoftware","download_url":"https://codeload.github.com/sbsoftware/crumble-jobs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbsoftware%2Fcrumble-jobs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31309834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-04-02T16:25:07.273Z","updated_at":"2026-04-02T16:25:07.702Z","avatar_url":"https://github.com/sbsoftware.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crumble-jobs\n\nBackground job framework for Crumble applications.\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     crumble-jobs:\n       github: sbsoftware/crumble-jobs\n   ```\n\n2. Run `shards install`.\n\n## Usage\n\n```crystal\nrequire \"crumble-jobs\"\n```\n\n### Configure the queue\n\nConfigure a single queue backend for the app using the macro. The queue is reused by jobs and workers.\n\n```crystal\nCrumble::Jobs.configure_queue Crumble::Jobs::InMemoryQueue.new\n# or\nCrumble::Jobs.configure_queue Crumble::Jobs::FileQueue.new(\"./tmp/jobs\")\n```\n\nAfter configuration, jobs enqueue through `Crumble::Jobs.queue` and workers default to the same queue.\n\n### Define jobs\n\n```crystal\nclass IncrementCounterJob \u003c Crumble::Jobs::Job\n  params session_key : String, counter_id : Int64\n\n  def perform : Nil\n    # ...\n  end\nend\n```\n\nThrottle a job class:\n\n```crystal\nclass SyncWebhookJob \u003c Crumble::Jobs::Job\n  throttle max_jobs: 10, timespan: 5.minutes\n  params endpoint : String\n\n  def perform : Nil\n    # ...\n  end\nend\n```\n\n`throttle` applies when a worker starts jobs, not when jobs are enqueued.\nEnqueueing is never blocked by throttling.\nA worker starts at most `max_jobs` jobs of that class inside one window, and the window starts with the first execution in the current burst.\nAfter the limit is reached, later jobs of the same class wait until the window expires, and same-class execution order is preserved.\n\nEnqueue a job:\n\n```crystal\nIncrementCounterJob.enqueue(\"session-uuid\", 123)\n```\n\n### Worker\n\n```crystal\nworker = Crumble::Jobs::Worker.new(max_concurrency: 4)\nworker.start\n```\n\n## Development\n\n- Format: `crystal tool format`\n- Tests: `crystal spec`\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/sbsoftware/crumble-jobs/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Stefan Bilharz](https://github.com/sbsoftware) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbsoftware%2Fcrumble-jobs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbsoftware%2Fcrumble-jobs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbsoftware%2Fcrumble-jobs/lists"}