{"id":21660165,"url":"https://github.com/node-celery-ts/node-celery-ts","last_synced_at":"2025-09-09T12:02:54.764Z","repository":{"id":42085469,"uuid":"144798584","full_name":"node-celery-ts/node-celery-ts","owner":"node-celery-ts","description":"TypeScript Celery client for Node","archived":false,"fork":false,"pushed_at":"2025-06-17T23:17:20.000Z","size":1599,"stargazers_count":135,"open_issues_count":29,"forks_count":30,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-07T20:43:35.928Z","etag":null,"topics":["amqp","celery","rabbitmq","redis","typescript"],"latest_commit_sha":null,"homepage":"https://node-celery-ts.github.io/node-celery-ts/","language":"TypeScript","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/node-celery-ts.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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}},"created_at":"2018-08-15T03:00:18.000Z","updated_at":"2025-09-02T01:26:22.000Z","dependencies_parsed_at":"2024-06-20T23:23:43.231Z","dependency_job_id":"e1a07d69-c5c9-4f58-9858-f92e86379c47","html_url":"https://github.com/node-celery-ts/node-celery-ts","commit_stats":{"total_commits":21,"total_committers":9,"mean_commits":"2.3333333333333335","dds":0.7619047619047619,"last_synced_commit":"35563aff28f7a05cfeef42eadbbc1e23b893f01f"},"previous_names":["ibm/node-celery-ts"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/node-celery-ts/node-celery-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-celery-ts%2Fnode-celery-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-celery-ts%2Fnode-celery-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-celery-ts%2Fnode-celery-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-celery-ts%2Fnode-celery-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node-celery-ts","download_url":"https://codeload.github.com/node-celery-ts/node-celery-ts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-celery-ts%2Fnode-celery-ts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274121957,"owners_count":25225801,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"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":["amqp","celery","rabbitmq","redis","typescript"],"created_at":"2024-11-25T09:32:23.272Z","updated_at":"2025-09-09T12:02:54.514Z","avatar_url":"https://github.com/node-celery-ts.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Status\n\n[![NPM](https://img.shields.io/npm/v/celery-ts.svg)](https://www.npmjs.com/package/celery-ts)\n[![Maintainability](https://api.codeclimate.com/v1/badges/841b29c65d87bcdcdc85/maintainability)](https://codeclimate.com/github/node-celery-ts/node-celery-ts/maintainability)[![Test Coverage](https://api.codeclimate.com/v1/badges/841b29c65d87bcdcdc85/test_coverage)](https://codeclimate.com/github/node-celery-ts/node-celery-ts/test_coverage)\n\n# Description\n\n`node-celery-ts` is a Celery client for Node.js written in TypeScript.\n`node-celery-ts` supports RabbitMQ and Redis result brokers and RPC (over\nRabbitMQ) and Redis result backends. `node-celery-ts` provides\nhigher performance than Celery on PyPy and provides greater feature support than\n[`node-celery`](https://github.com/mher/node-celery), including Redis Sentinel\nand Cluster, RPC result backends, YAML serialization, zlib task compression, and\nPromise-based interfaces. `node-celery-ts` uses\n[`amqplib`](https://github.com/squaremo/amqp.node) and\n[`ioredis`](https://github.com/luin/ioredis) for RabbitMQ and Redis,\nrespectively. `node-celery-ts` does not support Amazon SQS or Zookeeper message\nbrokers, nor does it support SQLAlchemy, Memcached, Cassandra, Elasticsearch,\nIronCache, Couchbase, CouchDB, filesystem, or Consul result backends.\n\n\n# Usage\n## Basic\n```typescript\nimport * as Celery from \"celery-ts\";\n\nconst client: Celery.Client = Celery.createClient({\n\tbrokerUrl: \"amqp://localhost\",\n\tresultBackend: \"redis://localhost\",\n});\n\nconst task: Celery.Task\u003cnumber\u003e = client.createTask\u003cnumber\u003e(\"tasks.add\");\nconst result: Celery.Result\u003cnumber\u003e = task.applyAsync({\n\targs: [0, 1],\n\tkwargs: { },\n});\n\nconst promise: Promise\u003cnumber\u003e = result.get();\n\npromise.then(console.log)\n\t.catch(console.error);\n```\n\n## Advanced\n```typescript\nimport * as Celery from \"celery-ts\";\n\nconst id = \"7a5b72ab-03d1-47d9-8a9d-54af7c26bd59\";\nconst brokers: Array\u003cCelery.MessageBroker\u003e = [\n\tCelery.createBroker(\"amqp://localhost\"),\n];\nconst backend: Celery.ResultBackend = Celery.createBackend(\"redis://localhost\");\n\nconst client: Celery.Client = new Celery.Client({\n\tbackend,\n\tbrokers,\n\tid,\n});\n```\n\n## Message Broker Failover\n```typescript\nconst id = \"7a5b72ab-03d1-47d9-8a9d-54af7c26bd59\";\nconst brokers: Array\u003cCelery.MessageBroker\u003e = [\n\tCelery.createBroker(\"amqp://localhost\"),\n\tCelery.createBroker(\"amqp://localhost:5673\"),\n];\nconst backend: Celery.ResultBackend = Celery.createBackend(\"redis://localhost\");\n\nconst failoverStrategy: Celery.FailoverStrategy = (\n\tbrokers: Array\u003cCelery.MessageBroker\u003e,\n): Celery.MessageBroker =\u003e {\n\treturn brokers[Math.floor(Math.random() * 2)];\n};\n\nconst client: Celery.Client = new Celery.Client({\n\tbackend,\n\tbrokers,\n\tfailoverStrategy,\n\tid,\n});\n```\n\n## Task Options\n\n```typescript\nconst client: Celery.Client = Celery.createClient({\n\tbrokerUrl: \"amqp://localhost\",\n\tresultBackend: \"redis://localhost\",\n});\n\nconst task: Celery.Task\u003cnumber\u003e = client.createTask\u003cnumber\u003e(\"tasks.add\");\nconst result: Celery.Result\u003cnumber\u003e = task.applyAsync({\n\targs: [0, 1],\n\tcompression: Celery.Compressor.Zlib,\n\teta: new Date(Date.now() + 1000),\n\texpires: new Date(Date.now() + 5000),\n\tkwargs: { },\n\tserializer: Celery.Serializer.Yaml,\n});\n\nconst promise: Promise\u003cnumber\u003e = result.get();\n\npromise.then(console.log)\n\t.catch(console.error);\n```\n\n## RabbitMQ\n### `AmqpBroker`\n\n```typescript\nconst options: Celery.AmqpOptions = {\n\thostname: \"localhost\",\n\tprotocol: \"amqp\",\n};\nconst broker = new Celery.AmqpBroker(options);\n```\n\n### `RpcBackend`\n\n```typescript\nconst id = \"7a5b72ab-03d1-47d9-8a9d-54af7c26bd59\";\nconst options: Celery.AmqpOptions = {\n\thostname: \"localhost\",\n\tprotocol: \"amqp\",\n};\nconst backend = new Celery.RpcBackend(id, options);\n```\n\n## Redis\n\n`RedisBackend` and `RedisBroker` both accept a `RedisOptions` object, which is\nan interface that can be extended by the user to allow new creational patterns.\n\n### TCP\n```typescript\nconst tcp: RedisOptions = new Celery.RedisTcpOptions({\n\thost: \"localhost\",\n\tprotocol: \"redis\",\n});\n```\n\n### Unix Socket\n```typescript\nconst socket: RedisOptions = new Celery.RedisSocketOptions({\n\tpath: \"/tmp/redis.sock\",\n\tprotocol: \"redis+socket\",\n});\n```\n\nIf you so desire, you may also provide options directly to `ioredis` when using\na TCP or Unix Socket connection. See `BasicRedisOptions` for the full list.\n\n### Sentinel\n```typescript\nconst sentinel: RedisOptions = new Celery.RedisSentinelOptions({\n\tsentinels: [\n\t\t{ host: \"localhost\", port: 26379 },\n\t\t{ host: \"localhost\", port: 26380 },\n\t],\n\tname: \"mymaster\",\n});\n```\n\n### Cluster\n```typescript\nconst cluster: RedisOptions = new Celery.RedisClusterOptions({\n\tnodes: [\n\t\t{ host: \"localhost\", port: 6379 },\n\t\t{ host: \"localhost\", port: 6380 },\n\t],\n});\n```\n\n# Thanks\n\n`node-celery-ts` was inspired by\n[`node-celery`](https://github.com/mher/node-celery). Special thanks to\n[Cameron Will](https://github.com/cwill747) for his guidance.\n\n# License\n\n`node-celery-ts` is licensed under the BSD-3-Clause license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-celery-ts%2Fnode-celery-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode-celery-ts%2Fnode-celery-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-celery-ts%2Fnode-celery-ts/lists"}