title: Carrierwave - destroy object only after mounted files have been deleted from storage
body: <p>Carrierwave deletes files after the destruction of the object has been completed:</p>
  
  <pre><code>after_commit :remove_avatar! :on =&gt; :destroy
  </code></pre>
  
  <p><a href="https://github.com/carrierwaveuploader/carrierwave" rel="nofollow">https://github.com/carrierwaveuploader/carrierwave</a></p>
  
  <p>I have a worker that deletes the files. If one of the workers timeout when deleting a file from S3 I lose track of the files on S3 and my bucket becomes a mess (since my object that had the mounted file is gone from my DB).</p>
  
  <p>How should I handle this?
  Directly call <code>remove_avatar!</code> before my <code>object.destroy</code> and then <code>skip_callback?</code> Is it safe?</p>