[英]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.