Class: Playit::Services::Metadata
- Inherits:
-
Object
- Object
- Playit::Services::Metadata
- Defined in:
- lib/playit/services/metadata.rb
Class Method Summary collapse
Class Method Details
.restart ⇒ Object
36 37 38 39 40 |
# File 'lib/playit/services/metadata.rb', line 36 def restart puts '[INFO] Restart metadata service...' stop start end |
.start ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/playit/services/metadata.rb', line 9 def start puts '[INFO] Start metadata service...' url = "#{Playit.config.attributes["metadata"]}/start" puts url begin open(url) { |f| f.each_line { |line| puts line } } rescue OpenURI::HTTPError puts "[ERROR] Already started! Call stop or restart methods" end end |