Skip to content

Commit a8176fe

Browse files
committed
Update spurious_classifications_alerter.rb
1 parent 1d03478 commit a8176fe

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

scripts/spurious_classifications_alerter.rb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,7 @@
1212
USER_CLASSIFICATION_COUNT_THRESHOLD = 1_000
1313

1414
puts 'Querying diffs to flag potential affected projects...'
15-
projects_weekly_classifications_history = ActiveRecord::Base.connection.exec_query("SELECT
16-
record1.day as day1,
17-
record2.day as day_compare,
18-
record1.project_id,
19-
record2.project_id,
20-
record1.classification_count as day1_count,
21-
record2.classification_count as day_compare_count,
22-
abs(cast(record2.classification_count - record1.classification_count as float) / record1.classification_count) * 100 as percentage_diff,
23-
abs(cast(record2.classification_count - record1.classification_count as float) / extract(day from record2.day - record1.day)) as classification_rate
15+
projects_weekly_classifications_history = ActiveRecord::Base.connection.exec_query("SELECT record1.day as day1, record2.day as day_compare, record1.project_id, record2.project_id, record1.classification_count as day1_count, record2.classification_count as day_compare_count,abs(cast(record2.classification_count - record1.classification_count as float) / record1.classification_count) * 100 as percentage_diff, abs(cast(record2.classification_count - record1.classification_count as float) / extract(day from record2.day - record1.day)) as classification_rate
2416
FROM
2517
daily_classification_count_per_project AS record1
2618
INNER JOIN

0 commit comments

Comments
 (0)