Sha256: aa2c892a5e7d3ea891eb62740b89125b14d5122eb64b48c94b118780a36ef6a3

Contents?: true

Size: 899 Bytes

Versions: 11

Compression:

Stored size: 899 Bytes

Contents

namespace :ruby_skynet do

  desc "Start the Ruby Skynet Server.\n Rails Example: rake ruby_skynet:server\n Without Rails: SKYNET_ENV=production SKYNET_CONFIG=config/ruby_skynet rake ruby_skynet:server"
  task :server => :environment do
    # Configuration is automatically loaded when running under Rails
    # so skip it here under Rails
    unless defined?(Rails)
      # Environment to use in config file
      environment = ENV['SKYNET_ENV']

      # Environment to use in config file
      cfg_file = ENV['SKYNET_CONFIG']

      # Load the configuration file
      RubySkynet.configure!(cfg_file, environment)
    end

    # Connect to services registry
    RubySkynet.services

    RubySkynet::Server.load_services

    begin
      # Start the server
      RubySkynet::Server.start
      RubySkynet::Server.wait_until_server_stops
    ensure
      RubySkynet::Server.stop
    end

  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ruby_skynet-1.3.0.alpha3 lib/ruby_skynet/railties/ruby_skynet.rake
ruby_skynet-1.3.0.alpha2 lib/ruby_skynet/railties/ruby_skynet.rake
ruby_skynet-1.3.0.alpha1 lib/ruby_skynet/railties/ruby_skynet.rake
ruby_skynet-1.2.7 lib/ruby_skynet/railties/ruby_skynet.rake
ruby_skynet-1.2.6 lib/ruby_skynet/railties/ruby_skynet.rake
ruby_skynet-1.2.5 lib/ruby_skynet/railties/ruby_skynet.rake
ruby_skynet-1.2.4 lib/ruby_skynet/railties/ruby_skynet.rake
ruby_skynet-1.2.3 lib/ruby_skynet/railties/ruby_skynet.rake
ruby_skynet-1.2.2 lib/ruby_skynet/railties/ruby_skynet.rake
ruby_skynet-1.2.1 lib/ruby_skynet/railties/ruby_skynet.rake
ruby_skynet-1.2.0 lib/ruby_skynet/railties/ruby_skynet.rake