2
我試圖讓Heroku運行一個簡單的Ruby進程並寫入到Logplex。如何讓Heroku從工作進程登錄?
我Procfile:
worker: ruby test_app.rb
test_app.rb:
puts 'LOGGGGG!'
raise 'we have a problem'
sleep(10)
當我運行的Heroku地方,我得到的預期輸出:
forego | starting worker.1 on port 5000
worker.1 | test_app.rb:10:in `<main>': we have a problem (RuntimeError)
worker.1 | LOGGGGG!
但是,當我加入,承諾並像往常一樣推送到Heroku我在日誌中沒有任何東西(heroku logs
) - 只有這個:
2015-11-27T17:55:39.671609+00:00 heroku[slug-compiler]: Slug compilation started
2015-11-27T17:55:39.671620+00:00 heroku[slug-compiler]: Slug compilation finished
我可能會做什麼錯?我不知所措...... 謝謝, 路易絲
編輯:我推輸出如下:
1 file changed, 1 deletion(-)
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 286 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Using set buildpack heroku/ruby
remote: -----> Ruby app detected
remote: -----> Compiling Ruby
remote: -----> Using Ruby version: ruby-2.2.2
remote: -----> Installing dependencies using bundler 1.9.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Using i18n 0.7.0
remote: Using json 1.8.3
remote: Using minitest 5.8.3
remote: Using thread_safe 0.3.5
remote: Using amq-protocol 2.0.0
remote: Using concurrent-ruby 1.0.0
remote: Using connection_pool 2.2.0
remote: Using netrc 0.7.9
remote: Using redis 3.2.2
remote: Using bundler 1.9.7
remote: Using tzinfo 1.2.2
remote: Using bunny 2.2.1
remote: Using rest_client 1.8.3
remote: Using sidekiq 4.0.1
remote: Using activesupport 4.2.5
remote: Bundle complete! 7 Gemfile dependencies, 15 gems now installed.
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into ./vendor/bundle.
remote: Bundle completed (0.26s)
remote: Cleaning up the bundler cache.
remote: -----> Writing config/database.yml to read from DATABASE_URL
remote:
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> worker
remote: Default types for buildpack -> console, rake
remote:
remote: -----> Compressing... done, 18.1MB
remote: -----> Launching... done, v19
remote: https://application-name.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To [email protected]:application-name.git
75d764d..a7d6bdb master -> master