Not 100% sure if this is an issue or not.
My Heroku procfile looks like this:
``web: python manage.py collectstatic --noinput; python manage.py compress; newrelic-admin run-program python manage.py run_gunicorn -b "0.0.0.0:$PORT" -w 9 -k gevent --max-requests 250`
This works perfectly when I do a git push. It rewrites all the relative URLS's to my S3 absolute URLS. However if the dyno processes restart, it successfully copies the assets and creates a new cache file for the css, but it doesn't rewrite the relative URLs, so all of the sudden my assets are looking in the wrong place (relative out of the CACHE folder).
Doing more investigation. On initial push, the filename does start with self.root which is /app/static. However when the process resets, it instead starts with one of my static folders /app/assets. Since they don't match, it just returns the content.
The problem exists here in base.py:
# call path first so remote storages don't make it to exists,
# which would cause network I/O
filename = self.storage.path(basename)
print "first filename %s" % filename
if not self.storage.exists(basename):
filename = None
# remote storages don't implement path, access the file locally
filename = compressor_file_storage.path(basename)
print "second filename %s" % filename
During the push the try fails and the exception happens. During the subsequent restart, the try succeeds and returns a different filename.
Are you able to maybe provide insight as to what is going on in this bit of code, and then I can try to address the issue with a pull request?
Anyone? People must be using this on heroku.
Sorry, I'm not sure what's going on here.