summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornfoy <nfoy@purdue.edu>2014-04-06 20:04:20 -0400
committernfoy <nfoy@purdue.edu>2014-04-06 20:04:20 -0400
commite02fb83cdc7a971691cebf031eb35efd6665833b (patch)
tree9a5b0dd35f0e41338e61f0d17d84dd6157ae858b
parent7014368b151cba5b17ceaa85a107674d5865b22c (diff)
Ran generate
-rwxr-xr-xbin/delayed_job5
-rw-r--r--db/migrate/20140406195921_create_simple_captcha_data.rb (renamed from db/migrate/20140406131442_create_simple_captcha_data.rb)0
-rw-r--r--db/migrate/20140406235927_create_delayed_jobs.rb22
-rw-r--r--db/migrate/20140406235933_create_servers.rb (renamed from db/migrate/20140406171445_create_servers.rb)0
-rw-r--r--db/migrate/20140406235940_create_matches.rb (renamed from db/migrate/20140406171448_create_matches.rb)0
-rw-r--r--db/migrate/20140406235946_create_teams.rb (renamed from db/migrate/20140406171451_create_teams.rb)0
-rw-r--r--db/migrate/20140406235952_create_alerts.rb (renamed from db/migrate/20140406171453_create_alerts.rb)0
-rw-r--r--db/migrate/20140406235958_create_pms.rb (renamed from db/migrate/20140406171456_create_pms.rb)0
-rw-r--r--db/migrate/20140407000005_create_tournaments.rb (renamed from db/migrate/20140406171459_create_tournaments.rb)0
-rw-r--r--db/migrate/20140407000011_create_games.rb (renamed from db/migrate/20140406171502_create_games.rb)0
-rw-r--r--db/migrate/20140407000017_create_users.rb (renamed from db/migrate/20140406171505_create_users.rb)0
-rw-r--r--db/migrate/20140407000024_create_sessions.rb (renamed from db/migrate/20140406171508_create_sessions.rb)0
-rw-r--r--db/migrate/20140407000030_create_server_settings.rb (renamed from db/migrate/20140406171510_create_server_settings.rb)0
-rw-r--r--db/migrate/20140407000036_create_game_settings.rb (renamed from db/migrate/20140406171513_create_game_settings.rb)0
-rw-r--r--db/migrate/20140407000042_create_tournament_preferences.rb (renamed from db/migrate/20140406171516_create_tournament_preferences.rb)0
-rw-r--r--db/migrate/20140407000048_create_scores.rb (renamed from db/migrate/20140406171519_create_scores.rb)0
-rw-r--r--db/migrate/20140407000054_create_remote_usernames.rb (renamed from db/migrate/20140406171522_create_remote_usernames.rb)0
-rw-r--r--db/migrate/20140407000100_create_tournament_players_join_table.rb (renamed from db/migrate/20140406171525_create_tournament_players_join_table.rb)0
-rw-r--r--db/migrate/20140407000106_create_tournament_hosts_join_table.rb (renamed from db/migrate/20140406171527_create_tournament_hosts_join_table.rb)0
-rw-r--r--db/migrate/20140407000112_create_team_user_join_table.rb (renamed from db/migrate/20140406171530_create_team_user_join_table.rb)0
-rw-r--r--db/migrate/20140407000118_create_match_team_join_table.rb (renamed from db/migrate/20140406171532_create_match_team_join_table.rb)0
-rw-r--r--db/migrate/20140407000143_add_hidden_attrs_to_user.rb (renamed from db/migrate/20140406171543_add_hidden_attrs_to_user.rb)0
-rw-r--r--db/schema.rb18
23 files changed, 44 insertions, 1 deletions
diff --git a/bin/delayed_job b/bin/delayed_job
new file mode 100755
index 0000000..edf1959
--- /dev/null
+++ b/bin/delayed_job
@@ -0,0 +1,5 @@
+#!/usr/bin/env ruby
+
+require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment'))
+require 'delayed/command'
+Delayed::Command.new(ARGV).daemonize
diff --git a/db/migrate/20140406131442_create_simple_captcha_data.rb b/db/migrate/20140406195921_create_simple_captcha_data.rb
index 4573b20..4573b20 100644
--- a/db/migrate/20140406131442_create_simple_captcha_data.rb
+++ b/db/migrate/20140406195921_create_simple_captcha_data.rb
diff --git a/db/migrate/20140406235927_create_delayed_jobs.rb b/db/migrate/20140406235927_create_delayed_jobs.rb
new file mode 100644
index 0000000..ec0dd93
--- /dev/null
+++ b/db/migrate/20140406235927_create_delayed_jobs.rb
@@ -0,0 +1,22 @@
+class CreateDelayedJobs < ActiveRecord::Migration
+ def self.up
+ create_table :delayed_jobs, :force => true do |table|
+ table.integer :priority, :default => 0, :null => false # Allows some jobs to jump to the front of the queue
+ table.integer :attempts, :default => 0, :null => false # Provides for retries, but still fail eventually.
+ table.text :handler, :null => false # YAML-encoded string of the object that will do work
+ table.text :last_error # reason for last failure (See Note below)
+ table.datetime :run_at # When to run. Could be Time.zone.now for immediately, or sometime in the future.
+ table.datetime :locked_at # Set when a client is working on this object
+ table.datetime :failed_at # Set when all retries have failed (actually, by default, the record is deleted instead)
+ table.string :locked_by # Who is working on this object (if locked)
+ table.string :queue # The name of the queue this job is in
+ table.timestamps
+ end
+
+ add_index :delayed_jobs, [:priority, :run_at], :name => 'delayed_jobs_priority'
+ end
+
+ def self.down
+ drop_table :delayed_jobs
+ end
+end
diff --git a/db/migrate/20140406171445_create_servers.rb b/db/migrate/20140406235933_create_servers.rb
index fbe1b02..fbe1b02 100644
--- a/db/migrate/20140406171445_create_servers.rb
+++ b/db/migrate/20140406235933_create_servers.rb
diff --git a/db/migrate/20140406171448_create_matches.rb b/db/migrate/20140406235940_create_matches.rb
index 31eea12..31eea12 100644
--- a/db/migrate/20140406171448_create_matches.rb
+++ b/db/migrate/20140406235940_create_matches.rb
diff --git a/db/migrate/20140406171451_create_teams.rb b/db/migrate/20140406235946_create_teams.rb
index fdf9a68..fdf9a68 100644
--- a/db/migrate/20140406171451_create_teams.rb
+++ b/db/migrate/20140406235946_create_teams.rb
diff --git a/db/migrate/20140406171453_create_alerts.rb b/db/migrate/20140406235952_create_alerts.rb
index 68a8e10..68a8e10 100644
--- a/db/migrate/20140406171453_create_alerts.rb
+++ b/db/migrate/20140406235952_create_alerts.rb
diff --git a/db/migrate/20140406171456_create_pms.rb b/db/migrate/20140406235958_create_pms.rb
index 93bb5c6..93bb5c6 100644
--- a/db/migrate/20140406171456_create_pms.rb
+++ b/db/migrate/20140406235958_create_pms.rb
diff --git a/db/migrate/20140406171459_create_tournaments.rb b/db/migrate/20140407000005_create_tournaments.rb
index c0d8929..c0d8929 100644
--- a/db/migrate/20140406171459_create_tournaments.rb
+++ b/db/migrate/20140407000005_create_tournaments.rb
diff --git a/db/migrate/20140406171502_create_games.rb b/db/migrate/20140407000011_create_games.rb
index 5e4f56f..5e4f56f 100644
--- a/db/migrate/20140406171502_create_games.rb
+++ b/db/migrate/20140407000011_create_games.rb
diff --git a/db/migrate/20140406171505_create_users.rb b/db/migrate/20140407000017_create_users.rb
index 8032870..8032870 100644
--- a/db/migrate/20140406171505_create_users.rb
+++ b/db/migrate/20140407000017_create_users.rb
diff --git a/db/migrate/20140406171508_create_sessions.rb b/db/migrate/20140407000024_create_sessions.rb
index f667f1e..f667f1e 100644
--- a/db/migrate/20140406171508_create_sessions.rb
+++ b/db/migrate/20140407000024_create_sessions.rb
diff --git a/db/migrate/20140406171510_create_server_settings.rb b/db/migrate/20140407000030_create_server_settings.rb
index dfdd91b..dfdd91b 100644
--- a/db/migrate/20140406171510_create_server_settings.rb
+++ b/db/migrate/20140407000030_create_server_settings.rb
diff --git a/db/migrate/20140406171513_create_game_settings.rb b/db/migrate/20140407000036_create_game_settings.rb
index b1caf5d..b1caf5d 100644
--- a/db/migrate/20140406171513_create_game_settings.rb
+++ b/db/migrate/20140407000036_create_game_settings.rb
diff --git a/db/migrate/20140406171516_create_tournament_preferences.rb b/db/migrate/20140407000042_create_tournament_preferences.rb
index 991d659..991d659 100644
--- a/db/migrate/20140406171516_create_tournament_preferences.rb
+++ b/db/migrate/20140407000042_create_tournament_preferences.rb
diff --git a/db/migrate/20140406171519_create_scores.rb b/db/migrate/20140407000048_create_scores.rb
index 4ca0b0b..4ca0b0b 100644
--- a/db/migrate/20140406171519_create_scores.rb
+++ b/db/migrate/20140407000048_create_scores.rb
diff --git a/db/migrate/20140406171522_create_remote_usernames.rb b/db/migrate/20140407000054_create_remote_usernames.rb
index e265985..e265985 100644
--- a/db/migrate/20140406171522_create_remote_usernames.rb
+++ b/db/migrate/20140407000054_create_remote_usernames.rb
diff --git a/db/migrate/20140406171525_create_tournament_players_join_table.rb b/db/migrate/20140407000100_create_tournament_players_join_table.rb
index be240e8..be240e8 100644
--- a/db/migrate/20140406171525_create_tournament_players_join_table.rb
+++ b/db/migrate/20140407000100_create_tournament_players_join_table.rb
diff --git a/db/migrate/20140406171527_create_tournament_hosts_join_table.rb b/db/migrate/20140407000106_create_tournament_hosts_join_table.rb
index 7521d89..7521d89 100644
--- a/db/migrate/20140406171527_create_tournament_hosts_join_table.rb
+++ b/db/migrate/20140407000106_create_tournament_hosts_join_table.rb
diff --git a/db/migrate/20140406171530_create_team_user_join_table.rb b/db/migrate/20140407000112_create_team_user_join_table.rb
index f3b57fc..f3b57fc 100644
--- a/db/migrate/20140406171530_create_team_user_join_table.rb
+++ b/db/migrate/20140407000112_create_team_user_join_table.rb
diff --git a/db/migrate/20140406171532_create_match_team_join_table.rb b/db/migrate/20140407000118_create_match_team_join_table.rb
index c2ed1b7..c2ed1b7 100644
--- a/db/migrate/20140406171532_create_match_team_join_table.rb
+++ b/db/migrate/20140407000118_create_match_team_join_table.rb
diff --git a/db/migrate/20140406171543_add_hidden_attrs_to_user.rb b/db/migrate/20140407000143_add_hidden_attrs_to_user.rb
index 9b5c505..9b5c505 100644
--- a/db/migrate/20140406171543_add_hidden_attrs_to_user.rb
+++ b/db/migrate/20140407000143_add_hidden_attrs_to_user.rb
diff --git a/db/schema.rb b/db/schema.rb
index 53bc413..f4612b8 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20140406171543) do
+ActiveRecord::Schema.define(version: 20140407000143) do
create_table "alerts", force: true do |t|
t.integer "author_id"
@@ -22,6 +22,22 @@ ActiveRecord::Schema.define(version: 20140406171543) do
add_index "alerts", ["author_id"], name: "index_alerts_on_author_id"
+ create_table "delayed_jobs", force: true do |t|
+ t.integer "priority", default: 0, null: false
+ t.integer "attempts", default: 0, null: false
+ t.text "handler", null: false
+ t.text "last_error"
+ t.datetime "run_at"
+ t.datetime "locked_at"
+ t.datetime "failed_at"
+ t.string "locked_by"
+ t.string "queue"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority"
+
create_table "game_settings", force: true do |t|
t.integer "game_id"
t.integer "stype"