{"action":"created","issue":{"url":"https://api.github.com/repos/nesquena/backburner/issues/99","labels_url":"https://api.github.com/repos/nesquena/backburner/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/nesquena/backburner/issues/99/comments","events_url":"https://api.github.com/repos/nesquena/backburner/issues/99/events","html_url":"https://github.com/nesquena/backburner/pull/99","id":101168462,"number":99,"title":"Allow lambdas to determine queue name","user":{"login":"contentfree","id":10958,"avatar_url":"https://avatars.githubusercontent.com/u/10958?v=3","gravatar_id":"","url":"https://api.github.com/users/contentfree","html_url":"https://github.com/contentfree","followers_url":"https://api.github.com/users/contentfree/followers","following_url":"https://api.github.com/users/contentfree/following{/other_user}","gists_url":"https://api.github.com/users/contentfree/gists{/gist_id}","starred_url":"https://api.github.com/users/contentfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contentfree/subscriptions","organizations_url":"https://api.github.com/users/contentfree/orgs","repos_url":"https://api.github.com/users/contentfree/repos","events_url":"https://api.github.com/users/contentfree/events{/privacy}","received_events_url":"https://api.github.com/users/contentfree/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-15T11:49:43Z","updated_at":"2015-08-30T17:33:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nesquena/backburner/pulls/99","html_url":"https://github.com/nesquena/backburner/pull/99","diff_url":"https://github.com/nesquena/backburner/pull/99.diff","patch_url":"https://github.com/nesquena/backburner/pull/99.patch"},"body":"This changeset allows one-off or pre-configured usages of lambdas to determine the queue name. (I personally use this in Delayed::Job for different video rendering queues.)\r\n\r\nA couple examples:\r\n\r\n```ruby\r\n# Pre-configured queue using lambdas\r\nclass Example\r\n  include Backburner::Queue\r\n  queue lambda { |klass| klass.get_queue_name }\r\n\r\n  def self.get_queue_name; \"#{name.downcase}-jobs\" end\r\n  \r\n  def hard_task; \"do some work\" end\r\nend\r\n\r\n# One-off usage of lambas\r\nBackburner::Worker.enqueue(Example, :hard_task, queue: lambda { |klass| klass.get_queue_name })\r\n```"},"comment":{"url":"https://api.github.com/repos/nesquena/backburner/issues/comments/136162083","html_url":"https://github.com/nesquena/backburner/pull/99#issuecomment-136162083","issue_url":"https://api.github.com/repos/nesquena/backburner/issues/99","id":136162083,"user":{"login":"nesquena","id":6511,"avatar_url":"https://avatars.githubusercontent.com/u/6511?v=3","gravatar_id":"","url":"https://api.github.com/users/nesquena","html_url":"https://github.com/nesquena","followers_url":"https://api.github.com/users/nesquena/followers","following_url":"https://api.github.com/users/nesquena/following{/other_user}","gists_url":"https://api.github.com/users/nesquena/gists{/gist_id}","starred_url":"https://api.github.com/users/nesquena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nesquena/subscriptions","organizations_url":"https://api.github.com/users/nesquena/orgs","repos_url":"https://api.github.com/users/nesquena/repos","events_url":"https://api.github.com/users/nesquena/events{/privacy}","received_events_url":"https://api.github.com/users/nesquena/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T17:33:29Z","updated_at":"2015-08-30T17:33:29Z","body":"Can you add a description of how this works to the README? I would like to merge this in and cut a new release soon."}}