Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 28, 2020. It is now read-only.

Commit a422e4e

Browse files
author
v.promzelev
committed
use last created_at value for analyse
1 parent c1693ca commit a422e4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎lib/activerecord/overflow_signalizer.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def overflow_soon?(max, model)
4949
end
5050

5151
def avg(model)
52-
now = Time.now
52+
now = model.last.created_at
5353
week_records = (1..7).map do |t|
5454
from = now - DAY * t
5555
to = from + DAY

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /