Sha256: ba6a74b20a0239df4d01387b406924302634642ffd3ce5061cf0f6f78bf8a42d

Contents?: true

Size: 309 Bytes

Versions: 2

Compression:

Stored size: 309 Bytes

Contents

module GameMachine
  class RestartWatcher < Actor::Base

    def post_init(*args)
      schedule_message('check_restart',2000)
    end

    def on_receive(message)
      if message == 'check_restart'
        if Console::Server.restart?
          Console::Server.exit!
        end
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
game_machine-1.0.4 lib/game_machine/restart_watcher.rb
game_machine-1.0.2 lib/game_machine/restart_watcher.rb