mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-24 17:04:43 +00:00
Fixed the query for unassigned matches on the up_matches page and also only allow mats to get a new match assigned if they have less than 4 unfinished matches. Added mats to the finish_tournament_204 rake task.
This commit is contained in:
@@ -5,6 +5,27 @@ namespace :tournament do
|
||||
|
||||
@tournament = Tournament.find(204)
|
||||
|
||||
Mat.create(
|
||||
name: "1",
|
||||
tournament_id: @tournament.id
|
||||
)
|
||||
Mat.create(
|
||||
name: "2",
|
||||
tournament_id: @tournament.id
|
||||
)
|
||||
Mat.create(
|
||||
name: "3",
|
||||
tournament_id: @tournament.id
|
||||
)
|
||||
Mat.create(
|
||||
name: "4",
|
||||
tournament_id: @tournament.id
|
||||
)
|
||||
Mat.create(
|
||||
name: "5",
|
||||
tournament_id: @tournament.id
|
||||
)
|
||||
|
||||
GenerateTournamentMatches.new(@tournament).generate
|
||||
sleep(180)
|
||||
|
||||
@@ -45,7 +66,7 @@ namespace :tournament do
|
||||
match.save
|
||||
|
||||
# Pause to simulate processing delay
|
||||
sleep(30)
|
||||
sleep(10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user