             delete photo.thumb_du
             delete photo.scren
             delete photo.screen_du
-            cb()
+            setTimeout cb, 200
     ], (err) ->
         if err
             photo.trigger 'upError', err

class PhotoProcessor

    # create thumbs 3 by 3
    thumbsQueue: async.queue makeThumbWorker, 3

    # upload 2 by 2
    uploadQueue: async.queue uploadWorker, 2

    process: (photo) ->
        @thumbsQueue.push photo, (err) =>
            return console.log err if err
            @uploadQueue.push photo, (err) =>
                return console.log err if err

module.exports = new PhotoProcessor()

# create photo.thumb_du : a DataURL encoded thumbnail of photo.img
makeThumbDataURI = (photo, next) ->
    photo.thumb_du = resize photo, 300, 300, true
    photo.trigger 'thumbed'
    next()

# create photo.screen_du : a DataURL encoded thumbnail of photo.img
