Skip to content

Commit

Permalink
Adding rake task for hackathon
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamrege committed Aug 20, 2016
1 parent 18ea93e commit 92d7c96
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
9 changes: 0 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ GEM
kaminari (0.17.0)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
libv8 (3.16.14.15)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.4)
Expand Down Expand Up @@ -261,7 +260,6 @@ GEM
redis-store (~> 1.2.0)
redis-store (1.2.0)
redis (>= 2.2)
ref (2.0.0)
responders (2.2.0)
railties (>= 4.2.0, < 5.1)
rollbar (2.12.0)
Expand Down Expand Up @@ -306,9 +304,6 @@ GEM
activesupport (>= 4.0)
sprockets (>= 3.0.0)
stringex (2.6.1)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.5)
Expand Down Expand Up @@ -372,14 +367,10 @@ DEPENDENCIES
simple_form (~> 3.2.1)
simplecov
spring
therubyracer
turbolinks (~> 2.5)
uglifier (>= 1.3.0)
web-console (~> 2.0)
whenever

RUBY VERSION
ruby 2.3.0p0

BUNDLED WITH
1.12.5
17 changes: 17 additions & 0 deletions lib/tasks/utils.rake
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,21 @@ namespace :utils do

puts dublicate_repos_with_activies.collect &:id
end

desc "Hackathon Sync"
task :hackathon, [:group] => :environment do |t, args|
group = Group.where(name: args[:group]).first
if group # Ignore if incorrect name
type = "all"
round = Round.opened
group.members.each do |user|
UserReposJob.perform_later(user)
user.repositories.each do |repo|
CommitJob.perform_later(user, type, repo, round)
end
ActivityJob.perform_later(user, type, round)
end
end
end

end

1 comment on commit 92d7c96

@gautamrege
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refs #88

Please sign in to comment.