Add comments for async method calls. Refs #510

This commit is contained in:
Pavel Chipiga 2012-06-17 01:51:02 +03:00
parent b47b4ec075
commit f19e82b3fc
7 changed files with 9 additions and 9 deletions

View File

@ -98,7 +98,7 @@ class Platforms::PlatformsController < Platforms::BaseController
end end
def destroy def destroy
@platform.destroy @platform.destroy # later with resque
flash[:notice] = t("flash.platform.destroyed") flash[:notice] = t("flash.platform.destroyed")
redirect_to platforms_path redirect_to platforms_path
end end

View File

@ -132,7 +132,7 @@ class Projects::BuildListsController < Projects::BaseController
render :nothing => true, :status => 200 render :nothing => true, :status => 200
@build_list.publish if @build_list.auto_publish # && @build_list.can_publish? @build_list.publish if @build_list.auto_publish # && @build_list.can_publish? # later with resque
end end
def circle_build def circle_build

View File

@ -3,7 +3,7 @@
class UserMailer < ActionMailer::Base class UserMailer < ActionMailer::Base
default :from => APP_CONFIG['do-not-reply-email'] default :from => APP_CONFIG['do-not-reply-email']
include Resque::Mailer include Resque::Mailer # send email async
def new_user_notification(user) def new_user_notification(user)
@user = user @user = user

View File

@ -30,6 +30,6 @@ class MassBuild < ActiveRecord::Base
:repositories => self.repositories, :repositories => self.repositories,
:arches => self.arches, :arches => self.arches,
:auto_publish => self.auto_publish :auto_publish => self.auto_publish
) ) # later with resque
end end
end end

View File

@ -118,7 +118,7 @@ class Platform < ActiveRecord::Base
def full_clone(attrs = {}) def full_clone(attrs = {})
base_clone(attrs).tap do |c| base_clone(attrs).tap do |c|
with_skip {c.save} and c.clone_relations(self) and c.xml_rpc_clone with_skip {c.save} and c.clone_relations(self) and c.xml_rpc_clone # later with resque
end end
end end

View File

@ -41,12 +41,12 @@ class Project < ActiveRecord::Base
after_create :attach_to_personal_repository after_create :attach_to_personal_repository
after_create :create_git_repo after_create :create_git_repo
after_create {|p| p.fork_git_repo unless is_root?} after_create {|p| p.fork_git_repo unless is_root?} # later with resque
after_save :create_wiki after_save :create_wiki
after_destroy :destroy_git_repo after_destroy :destroy_git_repo
after_destroy :destroy_wiki after_destroy :destroy_wiki
after_save {|p| p.import_attached_srpm if p.srpm?} # should be after create_git_repo after_save {|p| p.import_attached_srpm if p.srpm?} # later with resque # should be after create_git_repo
# after_rollback lambda { destroy_git_repo rescue true if new_record? } # after_rollback lambda { destroy_git_repo rescue true if new_record? }
has_ancestry has_ancestry
@ -247,7 +247,7 @@ class Project < ActiveRecord::Base
def create_git_repo def create_git_repo
if is_root? if is_root?
Grit::Repo.init_bare(path) Grit::Repo.init_bare(path)
write_hook write_hook # later with resque
end end
end end

View File

@ -33,7 +33,7 @@ class Repository < ActiveRecord::Base
def full_clone(attrs = {}) def full_clone(attrs = {})
base_clone(attrs).tap do |c| base_clone(attrs).tap do |c|
with_skip {c.save} and c.clone_relations(self) with_skip {c.save} and c.clone_relations(self) # later with resque
end end
end end