簡體   English   中英

AppFog后台工作者“無法啟動”

[英]AppFog background worker 'failed to start'

我正在嘗試按照AppFog指南在ruby中創建后台工作程序 ,但遇到了一些(可能是菜鳥)問題。 該示例使用Rufus-scheduler ,(根據AppFog上的Ruby文檔 ),這意味着我需要使用Bundler在應用程序中包含/管理。 盡管如此,我已經運行bundle install ,以適當的(“獨立”)方式將所有內容推送到AppFog,但似乎仍然無法使其運行。

我的App和Gemfile: 在此處輸入圖片說明

...並通過AF CLI:

$ af push
[...creating/uploading/etc. etc... - removed to save space]
Staging Application 'chservice-dev': OK                                         
Starting Application 'chservice-dev': .

Error: Application [chservice-dev] failed to start, logs information below.

====> /logs/staging.log <====

# Logfile created on 2013-06-27 20:22:23 +0000 by logger.rb/25413
Need to fetch tzinfo-1.0.1.gem from RubyGems
Adding tzinfo-1.0.1.gem to app...
Adding rufus-scheduler-2.0.19.gem to app...
Adding bundler-1.1.3.gem to app...

====> /logs/stdout.log <====

2013-06-27 20:22:28.841 - script executed.

Delete the application? [Yn]: 

我該如何解決(或排除故障)? 我可能錯過了一個大步驟/概念...對於ruby來說是很新的=)

提前致謝。

我認為該應用可能會立即退出。 調度程序需要連接到主線程,以保持該應用程序運行。

require 'rubygems'
require 'rufus/scheduler'

scheduler = Rufus::Scheduler.start_new

scheduler.every '10s' do
  puts 'Log this'
end

### join the scheduler to the main thread ###
scheduler.join

我創建了一個可在appfog上運行的rufus Scheduler示例應用程序: https : //github.com/tsantef/appfog-rufus-example

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM