{"id":15695942,"url":"https://github.com/royalgarter/r-queue","last_synced_at":"2026-02-03T22:35:06.113Z","repository":{"id":57139093,"uuid":"305582916","full_name":"royalgarter/r-queue","owner":"royalgarter","description":"Simpl Redis Task Queue","archived":false,"fork":false,"pushed_at":"2024-05-17T04:02:37.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-27T11:54:58.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/royalgarter.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":"2020-10-20T03:47:50.000Z","updated_at":"2024-05-17T04:02:40.000Z","dependencies_parsed_at":"2024-05-17T04:33:44.602Z","dependency_job_id":"8573358d-4865-4368-a41e-00b5932fba30","html_url":"https://github.com/royalgarter/r-queue","commit_stats":{"total_commits":66,"total_committers":4,"mean_commits":16.5,"dds":0.5454545454545454,"last_synced_commit":"431be7b53a2a7ecf6a0ad672b77f788a70ef691c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/royalgarter/r-queue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royalgarter%2Fr-queue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royalgarter%2Fr-queue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royalgarter%2Fr-queue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royalgarter%2Fr-queue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/royalgarter","download_url":"https://codeload.github.com/royalgarter/r-queue/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royalgarter%2Fr-queue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29060578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T22:28:58.191Z","status":"ssl_error","status_checked_at":"2026-02-03T22:28:56.515Z","response_time":96,"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":"2024-10-03T19:05:32.245Z","updated_at":"2026-02-03T22:35:06.093Z","avatar_url":"https://github.com/royalgarter.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nrq: [N]ode.js [R]edis [Q]ueue\n\n* Work with CLI / required module / npx\n* Rebrand from [@royalgarter/r-queue]\n* [New Homepage](https://www.npmjs.com/package/nrq)\n\n**Global Install**\n\n    npm i nrq -g\n\n**NPX Mode. One-shot without Installing**\n\nDetails at CLI Mode with replacing \"nrq\" to \"npx -y nrq\"\n\n    npx -y nrq --help\n\n**NodeJS Module**\n\n    const redis = require('redis').createClient(process.env.REDIS_URL);\n    const nrq = require('nrq').create({\n        PREFIX: 'QAUTOBOT',\n        ENCLOSURE: true,\n\n        options: {\n            redis,\n            debug: true,\n        },\n    });\n\n    const QUEUE = 'JUST_A_QUEUE_NAME';\n\n    const event = new EventEmitter();\n    const resume = nrq.listen(QUEUE, {keepAlive:true, pause: true}, (e, task) =\u003e {\n        if (e) return event.emit('error', e);\n\n        event.emit('task', task);\n    });\n\n    event.on('error', console.log);\n\n    event.on('done', (task) =\u003e nrq.del(QUEUE, task._tid, (e, r) =\u003e console.log('task.deleted', e, r)));\n\n    nrq.push(QUEUE, {data: 'a simple data'}, (e, r) =\u003e console.log('pushed', e, r));\n\n - [See more](https://github.com/royalgarter/r-queue/blob/main/test.js)\n\n**CLI Mode \u0026 Lazy Documentation**\n\n    Usage: task [options]\n\n    Options:\n      -e, --execute             Run as CLI-EXECUTE mode\n      -d, --debug               DEBUG mode\n      -n, --enclosure           ENCLOSURE mode\n      -c, --cmd \u003ccmd\u003e           Command to execute\n      -r, --redis \u003credis\u003e       Redis connection string\n      -q, --queue \u003cqueue\u003e       Comma-separated queue name(s)\n      -p, --prefix \u003cprefix\u003e     Prefix name\n      -v, --var \u003cvar\u003e           Rest variables according to command (default: [])\n      -w, --pipevar             Append variable from pipeline shell |\n      -x, --xredis \u003cxredis...\u003e  Using raw redis cli command\n      -h, --help                display help for command\n\n    Commands (-c):\n      * emit:       (ev, args) =\u003e _emitter.emit(ev, args)\n      * on: (ev, cb) =\u003e _emitter.on(ev, cb)\n      * removeAllListeners: (ev) =\u003e _emitter.removeAllListeners(ev)\n      * push:       (cli, qs, tsk, cb){// Push task to queue. The callback is returned with task id (_tid) \u003e[ID, WAIT]\n      * pull:       (cli, q, cb){// Standard pulling task from WAIT queue and push to WORK queue. The task should be deleted when finished\n      * cpull:      (cli, q, cb){// Circular pulling task from WAIT and repush to WAIT\n      * ppull:      (cli, qs, cb){// Pulling task from many queues as once\n      * lpull:      (cli, q, t={times:30, interval:1e3}, cb){//  Long pulling from queue with retry option\n      * fpull:      (cli, q, ms=1e3, cb){// Return a stop function \u0026 setup forever pulling task from queue until pulled or the returned stop function is called\n      * listen:     (cli, q, o={keepAlive:true, interval:1e3, pause:false, visibility:0}, cb){// Listen on specific queue and callback whenever received a task\n      * len:        (cli, qs, cb){// Get total tasks in queue \u003e[WAIT, WORK]\n      * del:        (cli, qs, tid, cb){// Delete specific task by ID when you finish it \u003e[TASK, WAIT, WORK]\n      * state:      (cli, qs, tid, cb){// Check the state of task by ID \u003e[WAITING, WORKING]\n      * reset:      (cli, qs, tid, cb){// Reset specific task by ID in queue to WAIT \u003e[WAIT, WORK, ID]\n      * resetAll:   (cli, qs, cb){// Reset all tasks in specific queue to WAIT\n      * apush:      (cli, qs, tsk, cb){// Atomic push task to queue. The callback is returned with task id (_tid) \u003e[ID, WAIT]\n      * apull:      (cli, q, cb) {// Atomic pulling task from WAIT queue and push to WORK queue\n      * status:     (cli, cb){// Get status of every queues\n      * flush:      (cli, qs, cb){// Flush all tasks in specific queue (both WAIT \u0026 WORK)\n      * wipe:       (cli, wildcard, cb){// Wipe all queues \u0026 data\n      * version:    (...args){// Current version information\n      * emitAsync:   fn(...args) {\n      * onAsync:     fn(...args) {\n      * removeAllListenersAsync:     fn(...args) {\n      * pushAsync:   fn(...args) {\n      * pullAsync:   fn(...args) {\n      * cpullAsync:  fn(...args) {\n      * ppullAsync:  fn(...args) {\n      * lpullAsync:  fn(...args) {\n      * fpullAsync:  fn(...args) {\n      * listenAsync:         fn(...args) {\n      * lenAsync:    fn(...args) {\n      * delAsync:    fn(...args) {\n      * stateAsync:  fn(...args) {\n      * resetAsync:  fn(...args) {\n      * resetAllAsync:       fn(...args) {\n      * apushAsync:  fn(...args) {\n      * apullAsync:  fn(...args) {\n      * statusAsync:         fn(...args) {\n      * flushAsync:  fn(...args) {\n      * wipeAsync:   fn(...args) {\n      * versionAsync:        fn(...args) {\n\n    Examples: exec=(node nrq / nrq )\n            node nrq -e -q QTEST -c push -v \"{\"a\":1}\"\n            node nrq -e -q QTEST -c pull\n            nrq -e -q QTEST -c len\n            nrq -e -c status\n            nrq -e -x set \"TestRedisKey\" \"Hello World\"\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyalgarter%2Fr-queue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froyalgarter%2Fr-queue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyalgarter%2Fr-queue/lists"}