mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 09:42:36 +02:00
api_calls for score compute
This commit is contained in:
parent
97f0428745
commit
4447d24ed3
1 changed files with 1 additions and 1 deletions
|
@ -1077,7 +1077,7 @@ class Site < Sequel::Model
|
|||
end
|
||||
|
||||
def self.compute_scores
|
||||
select(:id, :username, :created_at, :updated_at, :views, :featured_at, :changed_count).exclude(is_banned: true).exclude(is_crashing: true).exclude(is_nsfw: true).exclude(updated_at: nil).where(site_changed: true).all.each do |s|
|
||||
select(:id, :username, :created_at, :updated_at, :views, :featured_at, :changed_count, :api_calls).exclude(is_banned: true).exclude(is_crashing: true).exclude(is_nsfw: true).exclude(updated_at: nil).where(site_changed: true).all.each do |s|
|
||||
s.score = s.compute_score
|
||||
s.save_changes validate: false
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue