#345: rollback changes
This commit is contained in:
parent
ca834696b8
commit
4087f4c94a
|
@ -2,7 +2,7 @@ module Feed::User
|
|||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
after_create :new_user_notification
|
||||
after_commit :new_user_notification, on: :create
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -11,8 +11,8 @@ module Git
|
|||
validates_attachment_content_type :srpm, content_type: ['application/octet-stream', "application/x-rpm", "application/x-redhat-package-manager"], message: I18n.t('layout.invalid_content_type')
|
||||
|
||||
after_create :create_git_repo
|
||||
after_create {|p| p.fork_git_repo unless p.is_root?} # later with resque
|
||||
after_create {|p| p.import_attached_srpm if p.srpm?} # later with resque # should be after create_git_repo
|
||||
after_commit(on: :create) {|p| p.fork_git_repo unless p.is_root?} # later with resque
|
||||
after_commit(on: :create) {|p| p.import_attached_srpm if p.srpm?} # later with resque # should be after create_git_repo
|
||||
after_destroy :destroy_git_repo
|
||||
# after_rollback -> { destroy_git_repo rescue true if new_record? }
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ class MassBuild < ActiveRecord::Base
|
|||
validates :projects_list, length: {maximum: 500_000}, presence: true
|
||||
validates_inclusion_of :auto_publish, :increase_release_tag, in: [true, false]
|
||||
|
||||
after_create :build_all
|
||||
after_commit :build_all, on: :create
|
||||
before_validation :set_data, on: :create
|
||||
|
||||
COUNT_STATUSES = [
|
||||
|
|
Loading…
Reference in New Issue