Skip to content

Commit

Permalink
convenience functions on console & remember streamboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
branch14 committed Mar 24, 2017
1 parent cf5bb69 commit 18f4766
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/venue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def reset_ephemeral_details
self.started_provisioning_at = nil
self.completed_provisioning_at = nil
# reset device! (no preselected device after server launched)
self.device = nil
# self.device = nil # but remember streamboxes
self.device_name = nil
end

Expand Down
12 changes: 12 additions & 0 deletions lib/irbrc.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
def venues
Venue.not_offline.order('state').each do |v|
puts "%20s %40s" % [v.state, v.name]
end
end

def restart_streaming_server!(v)
v = Venue.find(v) if !v.is_a?(Venue)
v.reset!
v.reload.become_available!
v.reload.start_provisioning!
end

0 comments on commit 18f4766

Please sign in to comment.