Minor tweaks

This commit is contained in:
Hakan Ensari 2018-09-11 17:59:12 +01:00
parent 479ed20142
commit 8060f41566
2 changed files with 13 additions and 4 deletions

View File

@ -15,10 +15,13 @@ gem 'sequel_pg'
gem 'sinatra'
group :development do
gem 'pry'
gem 'shotgun'
end
group :development, :test do
gem 'pry'
end
group :test do
gem 'minitest'
gem 'minitest-around'

View File

@ -1,12 +1,18 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
system 'rake db:setup'
`rake db:setup`
require 'rufus-scheduler'
scheduler = Rufus::Scheduler.new
scheduler.cron '*/15 15,16,17 * * 1-5', timeout: '1m' do
system 'rake rates:current'
trap 'INT' do
scheduler.shutdown
end
scheduler.cron '*/15 15,16,17 * * 1-5' do
`rake rates:current`
end
scheduler.join