Sha256: d55fd80b4689b83eadd3b7600a53d8fce8f3f457f63188124d216a6e6b1d87b9
Contents?: true
Size: 903 Bytes
Versions: 1
Compression:
Stored size: 903 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' require 'applix' $:.unshift File.join(File.dirname(__FILE__), '..', 'lib') require 'can-controls-gateway' $stderr.sync = true $stdout.sync = true Defaults = { } def main argv options = Defaults.merge(Hash.from_argv argv) puts " -- starting #{File.basename __FILE__} at #{Time.now}" args = (options.delete :args) #debugger if (defined? debugger) service_url = (args.shift || 'http://gom/services/ccg/home') puts " .. #{service_url}" service = nil daemon = Gom::Remote::Daemon.new(service_url, options) do |daemon, path| service = CcgRunner.new(path, options) daemon.redirect_log service.logfile daemon.check_in end daemon.background_loop(5) { service.run } daemon.actor_loop { |daemon| puts " -- gom refresh: #{Time.now}" } rescue => e puts " ## #{e}\n -> #{e.backtrace.join "\n "}" end main ARGV # vim: syntax=ruby
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tg-can-controls-gateway-0.1.3 | bin/can_controls_gateway |