2023-02-23 09:08:34 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module DiscourseAI
|
|
|
|
module NSFW
|
|
|
|
class EntryPoint
|
|
|
|
def inject_into(plugin)
|
|
|
|
require_relative "evaluation.rb"
|
2023-02-23 12:09:52 -05:00
|
|
|
require_relative "jobs/regular/evaluate_content.rb"
|
2023-02-23 09:08:34 -05:00
|
|
|
|
|
|
|
plugin.add_model_callback(Upload, :after_create) do
|
|
|
|
Jobs.enqueue(:evaluate_content, upload_id: self.id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|