{"action":"created","issue":{"url":"https://api.github.com/repos/lardawge/carrierwave_backgrounder/issues/244","repository_url":"https://api.github.com/repos/lardawge/carrierwave_backgrounder","labels_url":"https://api.github.com/repos/lardawge/carrierwave_backgrounder/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/lardawge/carrierwave_backgrounder/issues/244/comments","events_url":"https://api.github.com/repos/lardawge/carrierwave_backgrounder/issues/244/events","html_url":"https://github.com/lardawge/carrierwave_backgrounder/issues/244","id":175699727,"number":244,"title":"When destroy a model, same queue is repeatedly processed","user":{"login":"nullnull","id":1388551,"avatar_url":"https://avatars.githubusercontent.com/u/1388551?v=3","gravatar_id":"","url":"https://api.github.com/users/nullnull","html_url":"https://github.com/nullnull","followers_url":"https://api.github.com/users/nullnull/followers","following_url":"https://api.github.com/users/nullnull/following{/other_user}","gists_url":"https://api.github.com/users/nullnull/gists{/gist_id}","starred_url":"https://api.github.com/users/nullnull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nullnull/subscriptions","organizations_url":"https://api.github.com/users/nullnull/orgs","repos_url":"https://api.github.com/users/nullnull/repos","events_url":"https://api.github.com/users/nullnull/events{/privacy}","received_events_url":"https://api.github.com/users/nullnull/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-08T08:56:01Z","updated_at":"2016-11-06T19:15:24Z","closed_at":null,"body":"When I destroyed a model, I encountered the problem that same sidekiq queue was repeatedly processed in a very short time, and finally `sidekiq.log` file became very huge size.\nI thought this was because `enqueue_#{column}_background_job` was kicked by `after_commit`, enqueued my resize job, my resize job always failed and called `when_not_ready` because record not found, and retried the same job repeatedly.\nMy resize job is like this (same as `README.md`)\n\n``` ruby\nclass MyResizeJobWorker < ActiveJob::Base\n  include ::CarrierWave::Workers::ProcessAssetMixin\n\n  def when_not_ready\n    retry_job\n  end\nend\n```\n\nI know I can avoid this problem by deleting `retry_job` method from my resize job class.\nBut I think enqueing callback should be kicked only when record was saved or updated, not destroyed.\nWhat do you think about it?\n"},"comment":{"url":"https://api.github.com/repos/lardawge/carrierwave_backgrounder/issues/comments/258703108","html_url":"https://github.com/lardawge/carrierwave_backgrounder/issues/244#issuecomment-258703108","issue_url":"https://api.github.com/repos/lardawge/carrierwave_backgrounder/issues/244","id":258703108,"user":{"login":"davidwessman","id":6763624,"avatar_url":"https://avatars.githubusercontent.com/u/6763624?v=3","gravatar_id":"","url":"https://api.github.com/users/davidwessman","html_url":"https://github.com/davidwessman","followers_url":"https://api.github.com/users/davidwessman/followers","following_url":"https://api.github.com/users/davidwessman/following{/other_user}","gists_url":"https://api.github.com/users/davidwessman/gists{/gist_id}","starred_url":"https://api.github.com/users/davidwessman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidwessman/subscriptions","organizations_url":"https://api.github.com/users/davidwessman/orgs","repos_url":"https://api.github.com/users/davidwessman/repos","events_url":"https://api.github.com/users/davidwessman/events{/privacy}","received_events_url":"https://api.github.com/users/davidwessman/received_events","type":"User","site_admin":false},"created_at":"2016-11-06T19:15:24Z","updated_at":"2016-11-06T19:15:24Z","body":"@kyledecot How did you stop it? I have a process running shit loads of jobs from a deleted resource..."}}
{"actor":{"display_login":"davidwessman"}}