This code looks like kludge, `rescue nil` is going to catch too much

```ruby 
begin
  while attachment = queue.pop(true)
    update_file_on_s3(attachment, objects)
  end
rescue ThreadError
end
```