Pushed widget improved
This commit is contained in:
parent
ed247b3893
commit
77cf662034
7 changed files with 22 additions and 16 deletions
|
@ -48,8 +48,8 @@ module Account
|
|||
end
|
||||
|
||||
def recent_push project_id = nil
|
||||
# Get push events not earlier than 6 hours ago
|
||||
events = recent_events.code_push.where("created_at > ?", Time.now - 6.hours)
|
||||
# Get push events not earlier than 2 hours ago
|
||||
events = recent_events.code_push.where("created_at > ?", Time.now - 2.hours)
|
||||
events = events.where(:project_id => project_id) if project_id
|
||||
|
||||
# Take only latest one
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue