2013-05-07 14:25:41 -04:00
|
|
|
module Jobs
|
|
|
|
class CloseTopic < Jobs::Base
|
|
|
|
|
|
|
|
def execute(args)
|
2013-11-10 18:52:44 -05:00
|
|
|
if topic = Topic.where(id: args[:topic_id]).first
|
2013-07-05 01:21:04 -04:00
|
|
|
closer = User.where(id: args[:user_id]).first
|
2013-11-10 18:52:44 -05:00
|
|
|
topic.auto_close(closer)
|
2013-05-07 14:25:41 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|