class Gush::Control::App

Private Instance Methods

format_time(timestamp) click to toggle source
# File lib/gush/control/app.rb, line 173
def format_time(timestamp)
  Time.at(timestamp) if timestamp
end
redis() click to toggle source
# File lib/gush/control/app.rb, line 169
def redis
  Thread.current[:redis] ||= Redis.new(url: settings.client.configuration.redis_url)
end
remove_logs(workflow) click to toggle source
# File lib/gush/control/app.rb, line 186
def remove_logs(workflow)
  redis.keys("gush.logs.#{workflow.id}.*").each {|key| redis.del(key) }
end
remove_logs_in_channel(channel) click to toggle source
# File lib/gush/control/app.rb, line 190
def remove_logs_in_channel(channel)
  redis.del("gush.logs.#{channel}")
end
remove_workflow(workflow) click to toggle source
# File lib/gush/control/app.rb, line 182
def remove_workflow(workflow)
  settings.client.destroy_workflow(workflow)
end
remove_workflow_and_logs(workflow) click to toggle source
# File lib/gush/control/app.rb, line 177
def remove_workflow_and_logs(workflow)
  remove_workflow(workflow)
  remove_logs(workflow)
end