0

I'm having trouble getting my worker process to update in Heroku. I have a worker dyno set in my Procfile that is connected to a Redis instance; I cannot see changes that I make to this file after deploying.

I've tried:

  • Resetting the dyno using heroku ps:restart worker.1 -a [appname]
  • Restarting all dynos using heroku ps:restart -a [appname]
  • Changing the contents of the file so the size is different
  • Changing the Procfile to point to a different PHP file

Nothing works. It looks like it picked up some of my changes overnight (maybe during reboot?) but I can't force it to pick up the changes... any ideas?

4

1 回答 1

0

记录救援...我的所需包含文件路径有问题,导致构建失败。它默认为最后一次成功的构建,这就是为什么它看起来像是在缓存的原因。

我可以通过在构建过程中查看日志来找到它:

heroku[worker.1]: Starting process with command `php bin/worker.php`
heroku[worker.1]: State changed from starting to up
heroku[worker.1]: Process exited with status 255
app[worker.1]: PHP Warning:  require_once(../vendor/autoload.php): failed to open stream: No such file or directory in /app/bin/worker.php on line 9
app[worker.1]: PHP Fatal error:  require_once(): Failed opening required '../vendor/autoload.php' (include_path='.:/app/.heroku/php/lib/php') in /app/bin/worker.php on line 9
heroku[worker.1]: State changed from up to crashed

一旦我解决了构建错误,它就不再“缓存”并且一切正常。

有效的包含路径:

require_once(__DIR__ . '/../vendor/autoload.php');

于 2018-03-14T16:46:09.900 回答