#200: removed activity_feed_observer
This commit is contained in:
parent
8782129985
commit
66fe5c11cf
|
@ -65,7 +65,7 @@ class GitHook
|
|||
end
|
||||
|
||||
def self.process(*args)
|
||||
ActivityFeedObserver.instance.after_create(args.size > 1 ? GitHook.new(*args) : args.first)
|
||||
Modules::Observers::ActivityFeed::Git.create_notifications(args.size > 1 ? GitHook.new(*args) : args.first)
|
||||
end
|
||||
|
||||
def find_user(user)
|
||||
|
|
|
@ -34,7 +34,7 @@ module Rosa
|
|||
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
||||
|
||||
# Activate observers that should always be running.
|
||||
config.active_record.observers = :event_log_observer, :activity_feed_observer, :build_list_observer
|
||||
config.active_record.observers = :event_log_observer, :build_list_observer
|
||||
|
||||
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
||||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
||||
|
|
|
@ -150,7 +150,7 @@ module Modules
|
|||
module ClassMethods
|
||||
def process_hook(owner_uname, repo, newrev, oldrev, ref, newrev_type, user = nil, message = nil)
|
||||
rec = GitHook.new(owner_uname, repo, newrev, oldrev, ref, newrev_type, user, message)
|
||||
ActivityFeedObserver.instance.after_create rec
|
||||
Modules::Observers::ActivityFeed::Git.create_notifications rec
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class ActivityFeedObserver < ActiveRecord::Observer
|
||||
module Modules::Observers::ActivityFeed::Git
|
||||
|
||||
def self.create_notifications(record)
|
||||
|
||||
def after_create(record)
|
||||
case record.class.to_s
|
||||
when 'GitHook'
|
||||
return unless record.project
|
||||
|
@ -58,6 +59,7 @@ class ActivityFeedObserver < ActiveRecord::Observer
|
|||
)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue