{"id":22799991,"url":"https://github.com/dadi/queue-wrapper","last_synced_at":"2025-04-19T16:53:06.700Z","repository":{"id":48017635,"uuid":"64756083","full_name":"dadi/queue-wrapper","owner":"dadi","description":"A high-level library for interacting with DADI Queue","archived":false,"fork":false,"pushed_at":"2023-01-12T09:56:24.000Z","size":431,"stargazers_count":2,"open_issues_count":11,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-29T10:33:30.305Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/dadi.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}},"created_at":"2016-08-02T12:46:04.000Z","updated_at":"2019-05-03T08:07:24.000Z","dependencies_parsed_at":"2023-02-09T11:16:48.171Z","dependency_job_id":null,"html_url":"https://github.com/dadi/queue-wrapper","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadi%2Fqueue-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadi%2Fqueue-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadi%2Fqueue-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadi%2Fqueue-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dadi","download_url":"https://codeload.github.com/dadi/queue-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249742765,"owners_count":21318989,"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","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-12-12T07:10:43.481Z","updated_at":"2025-04-19T16:53:06.673Z","avatar_url":"https://github.com/dadi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DADI Queue Wrapper\n\nA high-level library for interacting with [DADI Queue](https://github.com/dadi/queue)\n\n[![npm (scoped)](https://img.shields.io/npm/v/@dadi/queue-wrapper.svg?maxAge=10800\u0026style=flat-square)](https://www.npmjs.com/package/@dadi/queue-wrapper)\n[![Coverage Status](https://coveralls.io/repos/github/dadi/queue-wrapper/badge.svg?branch=master)](https://coveralls.io/github/dadi/queue-wrapper?branch=master)\n[![Build Status](https://travis-ci.org/dadi/queue-wrapper.svg?branch=master)](https://travis-ci.org/dadi/queue-wrapper)\n[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/)\n\n## Overview\n\nDADI Queue is a lightweight, high-performance task queue.\n\nThis library provides a simple wrapper for connecting and sending messages to the queue.\n\n## Getting started\n\n1. Install the **@dadi/queue-wrapper** module to your project:\n\n   `npm install @dadi/queue-wrapper --save`\n\n2. Add the library and configure the options:\n\n   ```javascript\n   const Queue = require('@dadi/queue-wrapper')\n   let queue = new Queue({\n     host: '127.0.0.1',\n     port: 6379,\n     name: 'myqueue'\n   })\n   ```\n\n3. Send a message:\n\n   ```javascript\n   queue.send('hello-world', function (err, resp) {\n     if (err) console.log('oh no')\n   })\n   ```\n\n### Deferring messages\n\n```javascript\nlet queue = new Queue({\n  ...\n  deferred: {\n    messages: ['foo', 'bar:baz'],\n    start: '20:00',\n    stop: '02:00'\n  }\n})\n```\n\nThe options above will ensure that the queue will only begin processing messages starting with 'foo' and 'bar:baz' between 20:00 and 02:00 every day.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdadi%2Fqueue-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdadi%2Fqueue-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdadi%2Fqueue-wrapper/lists"}