{"id":21721727,"url":"https://github.com/codesyncr/adonis-jobs","last_synced_at":"2026-01-31T08:05:58.306Z","repository":{"id":257436287,"uuid":"858356519","full_name":"CodeSyncr/adonis-jobs","owner":"CodeSyncr","description":"Bull Job Wrapper for Adonis JS","archived":false,"fork":false,"pushed_at":"2024-11-14T08:50:49.000Z","size":1428,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-06T00:56:33.197Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/CodeSyncr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-16T18:49:37.000Z","updated_at":"2024-11-14T08:50:53.000Z","dependencies_parsed_at":"2024-09-16T18:59:04.505Z","dependency_job_id":"2cdb9eb4-1123-4887-a9ea-e9e93f379c6f","html_url":"https://github.com/CodeSyncr/adonis-jobs","commit_stats":null,"previous_names":["codesyncr/adonis-jobs"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/CodeSyncr/adonis-jobs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSyncr%2Fadonis-jobs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSyncr%2Fadonis-jobs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSyncr%2Fadonis-jobs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSyncr%2Fadonis-jobs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeSyncr","download_url":"https://codeload.github.com/CodeSyncr/adonis-jobs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSyncr%2Fadonis-jobs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28934656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T07:49:44.436Z","status":"ssl_error","status_checked_at":"2026-01-31T07:49:34.274Z","response_time":128,"last_error":"SSL_read: 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":"2024-11-26T02:18:46.140Z","updated_at":"2026-01-31T08:05:58.289Z","avatar_url":"https://github.com/CodeSyncr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![adonis-jobs](https://socialify.git.ci/CodeSyncr/adonis-jobs/image?description=1\u0026descriptionEditable=Bull%20Job%20Wrapper%20for%20Adonis%20JS\u0026forks=1\u0026issues=1\u0026language=1\u0026name=1\u0026owner=1\u0026pattern=Signal\u0026pulls=1\u0026stargazers=1\u0026theme=Light)\n\n## What's this\n\n`@brighthustle/adonis-jobs` is a powerful queue system designed specifically for AdonisJS applications, leveraging the reliability and scalability of BullMQ, a Redis-based queue for Node.js. Inspired from `@rocketseat/adonis-bull`, it offers enhanced functionality tailored to AdonisJS's ecosystem.\n\n## Table of Contents\n\n1. [Installation](#installation)\n2. [Configuration](#configuration)\n3. [Usage](#usage)\n   - [Job Dispatching](#job-dispatching)\n   - [Job Creation](#job-creation)\n   - [Job Lifecycle](#job-lifecycle)\n4. [Advanced Features](#advanced-features)\n   - [Job Attempts and Retries](#job-attempts-and-retries)\n   - [Running the Queue Worker](#running-the-queue-worker)\n5. [Dependencies](#dependencies)\n\n## Installation \u003ca id=\"installation\"\u003e\u003c/a\u003e\n\nBegin by installing `@brighthustle/adonis-jobs` using npm:\n\n```bash\nnpm install @brighthustle/adonis-jobs\n```\n\n## Configuration \u003ca id=\"configuration\"\u003e\u003c/a\u003e\n\nAfter installation, configure the package to adapt it to your AdonisJS project:\n\n```bash\nnode ace configure @brighthustle/adonis-jobs\n```\n\n## Usage \u003ca id=\"usage\"\u003e\u003c/a\u003e\n\n### Job Dispatching \u003ca id=\"job-dispatching\"\u003e\u003c/a\u003e\n\nUtilize the `addTask` method provided by the `bull` provider to enqueue jobs.\nExample:\n\n\u003e Please note that #app is an alia that was created by me, and isn't in adonis by default... So if you want to use it, you will need to add it in your tsconfig and package.json\n\n```typescript\nimport app from '@adonisjs/core/services/app'\nimport queue from '@brighthustle/adonis-jobs/services/main'\n\n```\n\n### Job Creation \u003ca id=\"job-creation\"\u003e\u003c/a\u003e\n\nGenerate new job classes using the `node ace make:job {job}` command.\n\nExample:\n\n```ts\n// app/jobs/register_stripe_customer.ts\nimport { JobHandlerContract, Job } from '@brighthustle/adonis-jobs/types'\n\nexport type RegisterStripeCustomerPayload = {\n  userId: string\n}\n\nexport default class RegisterStripeCustomer\n  implements JobHandlerContract\u003cRegisterStripeCustomerPayload\u003e\n{\n  public async handle(job: Job\u003cRegisterStripeCustomerPayload\u003e) {\n    // Logic to register a Stripe customer\n    const { userId } = job.data\n    // Perform Stripe registration process\n  }\n\n  public async failed(job: Job\u003cRegisterStripeCustomerPayload\u003e) {\n    // Logic to handle failed job attempts\n    const { userId } = job.data\n    // Send notification or log failure\n  }\n}\n```\n\nRegister the new job into `start/jobs.ts`\n\n```ts\n// start/jobs.ts\nconst jobs: Record\u003cstring, Function\u003e = {}\n\nexport { jobs }\n```\n\n### Job Lifecycle \u003ca id=\"job-lifecycle\"\u003e\u003c/a\u003e\n\nDefine the `handle` method to execute job logic and the `failed` method to handle failed attempts.\n\n## Advanced Features \u003ca id=\"advanced-features\"\u003e\u003c/a\u003e\n\n### Job Attempts and Retries \u003ca id=\"job-attempts-and-retries\"\u003e\u003c/a\u003e\n\n- Customize the retry setting for jobs, configurable in the `config/queue.ts` file.\n- Adjust attempts and delays per job or globally.\n\n### Running the Queue Worker \u003ca id=\"running-the-queue-worker\"\u003e\u003c/a\u003e\n\nInitiate the queue worker using the `node ace queue:listen` command.\n\n- Specify queues or run the UI for monitoring and managing queues.\n\n## Dependencies \u003ca id=\"dependencies\"\u003e\u003c/a\u003e\n\n- **@queuedash/api**: Provides API endpoints for monitoring and managing queues.\n- **@trpc/server**: Starts QueueDash API server.\n- **bullmq**: The core library for handling queues.\n\n# Author\n\nKumar Yash\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesyncr%2Fadonis-jobs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodesyncr%2Fadonis-jobs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesyncr%2Fadonis-jobs/lists"}