fix race condition

Finally got around to fixing r101-marketing and r101-dashboard heroku errors.
This happens when the nginx buildpack starts, such as at deploys and every day.
I have not tested any of this code, but it looks right to me.