class BackscriptsController
Public Instance Methods
index()
click to toggle source
# File lib/generators/initializer/templates/backscript_controller.rb, line 5 def index @backscripts = Backscript.all end
trigering_backscript()
click to toggle source
# File lib/generators/initializer/templates/backscript_controller.rb, line 9 def trigering_backscript back_script = Backscript.find(params[:backscript_id]) command = back_script.command Open3.popen3(command) do |stdin, stdout, stderr, wait_thr| @status = stdout.read.to_s back_script.status = "Solr is Running Successfully." if @status.include?("Dsolr.data.dir") back_script.status = "Sidekiq is Running Successfully." if @status.include?("grep sidekiq") back_script.save! end redirect_to :back end