{"id":15374215,"url":"https://github.com/moteus/lua-lluv-qless","last_synced_at":"2026-07-15T10:32:19.380Z","repository":{"id":147045525,"uuid":"79899268","full_name":"moteus/lua-lluv-qless","owner":"moteus","description":"Lua binding for qless - queue / pipeline management system","archived":false,"fork":false,"pushed_at":"2019-05-05T13:53:45.000Z","size":126,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-10T15:50:54.434Z","etag":null,"topics":["lua-bindings","qless"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/moteus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2017-01-24T09:58:58.000Z","updated_at":"2019-05-05T13:53:46.000Z","dependencies_parsed_at":"2023-06-04T09:45:19.047Z","dependency_job_id":null,"html_url":"https://github.com/moteus/lua-lluv-qless","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moteus%2Flua-lluv-qless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moteus%2Flua-lluv-qless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moteus%2Flua-lluv-qless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moteus%2Flua-lluv-qless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moteus","download_url":"https://codeload.github.com/moteus/lua-lluv-qless/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247307328,"owners_count":20917448,"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":["lua-bindings","qless"],"created_at":"2024-10-01T13:57:48.509Z","updated_at":"2025-10-26T23:14:18.299Z","avatar_url":"https://github.com/moteus.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lua-lluv-qless\n[![Licence](http://img.shields.io/badge/Licence-MIT-brightgreen.svg)](LICENSE)\n[![Build Status](https://travis-ci.org/moteus/lua-lluv-qless.svg?branch=master)](https://travis-ci.org/moteus/lua-lluv-qless)\n[![Coverage Status](https://coveralls.io/repos/github/moteus/lua-lluv-qless/badge.svg?branch=master)](https://coveralls.io/github/moteus/lua-lluv-qless?branch=master)\n\n## Lua Bindings for [qless](https://github.com/seomoz/qless-core)\n\n### Usage\n\n#### Test job\n```Lua\n-- this is separate Lua module which export `perform` function\n-- This function accept 2 args\n-- 1 - QLessJob object\n-- 2 - `done` callback. Function have to call this function \n--      when job complete or fail.\nlocal uv = require \"lluv\"\n\nlocal function perform(job, done)\n\n  -- get work data\n  local i = job.data.counter\n  local t = job.data.interval\n\n  -- start async job\n  local timer = uv.timer():start(0, t, function(self)\n    print(job, '#', i) i = i - 1\n\n    if i == 0 then\n      self:close()\n      -- can just pass `done` as callback\n      return job:complete(done)\n    end\n  end)\n\n  -- to handle messages form server we can use EventEmitter API\n  job:on('lock_lost', function(self, event, data)\n    timer:close()\n    -- we do not need call `job:complete`/`job:fail` so just call `done`\n    -- we have not pass any error because worker class already know\n    -- that this job lost its lock so it just ignore any error.\n    done()\n  end)\n\nend\n\nreturn {\n  perform = perform\n}\n```\n\n#### Worker\n```Lua\nlocal uv                = require 'lluv'\nlocal QLessWorkerSerial = require 'lluv.qless.worker.serial'\n\nlocal worker = QLessWorkerSerial.new{\n  queues    = {'test-queue'};\n  reserver  = 'ordered';\n  concurent = 2;\n}\n\nworker:run()\n\nuv.run()\n```\n\n#### Client\n```Lua\nlocal uv    = require 'lluv'\nlocal QLess = require 'lluv.qless'\n\nlocal qless = QLess.new()\n\nlocal queue = qless:queue('test-queue')\n\nqueue:put(\"myjobs.test\", { counter = 10; interval = 1000 }, function(self, err, jid)\n  qless:close()\nend)\n\nuv.run()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoteus%2Flua-lluv-qless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoteus%2Flua-lluv-qless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoteus%2Flua-lluv-qless/lists"}