So Heroku routes their requests to your dynos randomly. While you're enhancing your middleware to log that dyno-level queue time, I have an optimization for you that should help fix the issue outright!
gem 'rack-timeout'
# Put this file on config/initializer | |
# This will create an empty whitelist of attributes available for mass assignment for | |
# all models in your app. As such, your models will need to explicitly whitelist | |
# accessible parameters by using an attr_accessible declaration. This technique is best | |
# applied at the start of a new project. However, for an existing project with a thorough | |
# set of functional tests, it should be straightforward and relatively quick to insert this | |
# initializer, run your tests, and expose each attribute (via attr_accessible) as dictated | |
# by your failing tests. |
So Heroku routes their requests to your dynos randomly. While you're enhancing your middleware to log that dyno-level queue time, I have an optimization for you that should help fix the issue outright!
gem 'rack-timeout'
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
git filter-branch -f --tree-filter "find . -type f -exec sed -e s/your-plain-password/some-string/ -e s/\'your-plain-token\'/ENV[\'ENVIRONMENT_VARIABLE_TOKEN\']/ -i '' {} \;" |
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log
in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.