Skip to content

Commit

Permalink
Update snapshot service default date
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-xiong committed Sep 23, 2023
1 parent 223df7a commit 3de8696
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/get_positions_summary_snapshots_service.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class GetPositionsSummarySnapshotsService
class << self
def execute(date = Date.today)
def execute(date = Date.yesterday)
info = SnapshotInfo.includes(:snapshot_positions).find_by(user_id: nil, event_date: date)
total_summary = info.snapshot_positions.total_summary
last_summary = SnapshotPosition.joins(:snapshot_info).where(snapshot_info: {user_id: nil, event_date: info.event_date - 1.day}).last_summary(data: total_summary)
Expand Down

0 comments on commit 3de8696

Please sign in to comment.