{"id":20439317,"url":"https://github.com/skitsanos/calls-queue","last_synced_at":"2026-04-29T16:07:43.834Z","repository":{"id":248093011,"uuid":"827716312","full_name":"skitsanos/calls-queue","owner":"skitsanos","description":"Efficient background processing of asynchronous tasks in Bun and Node.js applications","archived":false,"fork":false,"pushed_at":"2026-03-31T13:26:30.000Z","size":7,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-31T15:26:54.148Z","etag":null,"topics":["bun","nodejs","queue","queue-workers","queues","task-manager"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/skitsanos.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":"2024-07-12T08:16:51.000Z","updated_at":"2026-03-31T13:26:34.000Z","dependencies_parsed_at":"2024-07-12T10:45:45.286Z","dependency_job_id":"0073534c-eb57-4447-bf3a-bc46a54bec36","html_url":"https://github.com/skitsanos/calls-queue","commit_stats":null,"previous_names":["skitsanos/calls-queue"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/skitsanos/calls-queue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skitsanos%2Fcalls-queue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skitsanos%2Fcalls-queue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skitsanos%2Fcalls-queue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skitsanos%2Fcalls-queue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skitsanos","download_url":"https://codeload.github.com/skitsanos/calls-queue/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skitsanos%2Fcalls-queue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32433024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"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":["bun","nodejs","queue","queue-workers","queues","task-manager"],"created_at":"2024-11-15T09:16:15.700Z","updated_at":"2026-04-29T16:07:43.815Z","avatar_url":"https://github.com/skitsanos.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CallsQueue\n\n`CallsQueue` is a TypeScript class designed for efficient background processing of asynchronous tasks in Bun and Node.js applications. It's particularly useful for operations like logging or other I/O-bound tasks that don't require immediate feedback.\n\n## Key Features:\n\n1. **Concurrent Execution**: Utilizes a pool of Bun Workers to process multiple tasks simultaneously.\n2. **Configurable Concurrency**: Allows setting the number of concurrent workers (default is 5).\n3. **Non-Blocking**: Queues tasks for background processing, allowing the main thread to continue execution.\n4. **TypeScript Support**: Fully typed for improved developer experience and code safety.\n5. **Error Handling**: Captures and logs errors from worker executions without interrupting the queue.\n\n## Usage:\n\n```typescript\nimport CallsQueue from '@/queue.ts';\n\nconst queue = new CallsQueue(10); // Create a queue with 10 concurrent workers\n\nasync function someAsyncTask(data: any): Promise\u003cvoid\u003e {\n  // Your async operation here\n}\n\n// Enqueue tasks\nqueue.enqueue(someAsyncTask, { key: 'value' });\n\n// Tasks are processed automatically in the background\n```\n\n**Task example**\n\n```typescript\nconst logToRemoteServer = async (url: string, authorization: string, data: LogData): Promise\u003cvoid\u003e =\u003e\n{\n    // Your actual logging logic here\n    console.log('Logged to remote server:', data);\n\n    try\n    {\n        await fetch(url, {\n            method: 'POST',\n            body: JSON.stringify(data),\n            headers: {\n                'Content-Type': 'application/json',\n                'Authorization': authorization\n            }\n\n        });\n    }\n    catch (error)\n    {\n        console.error('Error logging to remote server:', error);\n    }\n};\n```\n\n## Implementation Notes:\n\n- Uses `Worker` API for true parallel execution.\n- Functions are serialized and passed to workers, along with their arguments.\n- Requires a separate `worker.ts` file in the same directory as `queue.ts`.\n\nThis queue is ideal for scenarios where you must offload numerous asynchronous operations without waiting for their completion, such as logging, non-critical API calls, or batch processing tasks.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskitsanos%2Fcalls-queue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskitsanos%2Fcalls-queue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskitsanos%2Fcalls-queue/lists"}