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

        (cb) -> makeThumbDataURI photo, cb
        (cb) ->
            delete photo.img
            cb()
    ], (err) ->
        if err
            photo.trigger 'upError', err
        else
            photo.trigger 'thumbed'

        done(err)

# make screen sized version and upload
uploadWorker = (photo, done) ->
    async.waterfall [
        (cb) -> readFile          photo, cb
        (cb) -> makeScreenDataURI photo, cb
        (cb) -> makeScreenBlob    photo, cb
        (cb) -> makeThumbBlob     photo, cb

class PhotoProcessor

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

    # 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()
