run_thin.py 437 B

123456789101112
  1. import helper
  2. from helper import Command
  3. import os
  4. def start(args, logfile, errfile):
  5. helper.set_database_host(args)
  6. command = Command("rvm ruby-2.0.0-p0 do bundle exec thin start -C config/thin.yml", False)
  7. return helper.run([command], logfile, errfile, args.troot)
  8. def stop(logfile, errfile):
  9. helper.run([Command('rm -rf tmp/*', True)], logfile, errfile, os.environ['TROOT'])
  10. return helper.stop('thin', logfile, errfile)