mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 05:47:31 +08:00
f8eddd40ad
After careful analysis of large data-sets it became apparent that avg_time had no impact whatsoever on "best of" topic scoring. Calculating avg_time was a very costly operation especially on large databases. We have some longer term plans of introducing other weighting that is read time based into our scoring for "best of" and "top" topics, but in the interim to stop a large amount of work that is not achieving any value we are removing the jobs. Column removal will follow once we decide on a new replacement metric.
18 lines
411 B
Ruby
18 lines
411 B
Ruby
require_dependency 'score_calculator'
|
|
|
|
module Jobs
|
|
|
|
# This job will run on a regular basis to update statistics and denormalized data.
|
|
# If it does not run, the site will not function properly.
|
|
class Weekly < Jobs::Scheduled
|
|
every 1.week
|
|
|
|
def execute(args)
|
|
ScoreCalculator.new.calculate
|
|
MiniScheduler::Stat.purge_old
|
|
Draft.cleanup!
|
|
UserAuthToken.cleanup!
|
|
end
|
|
end
|
|
end
|