discourse/app/jobs/regular/post_alert.rb

15 lines
323 B
Ruby
Raw Normal View History

2015-04-20 12:34:57 -05:00
module Jobs
class PostAlert < Jobs::Base
def execute(args)
2015-05-05 19:44:45 -05:00
# maybe it was removed by the time we are making the post
if post = Post.find(args[:post_id])
# maybe the topic was deleted, so skip in that case as well
PostAlerter.post_created(post) if post.topic
2015-05-05 19:44:45 -05:00
end
2015-04-20 12:34:57 -05:00
end
end
end