Skip to content

Commit

Permalink
Merge branch 'logger-daily-statistic' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
zmcNotafraid committed Jan 28, 2025
2 parents 63317b0 + 836f53e commit 93a0755
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/concerns/attr_logics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def reset_all!
def reset_one(attr_name)
raise "undefined attribute '#{attr_name}' calculation logic" unless attr_definitions[attr_name]

Rails.logger.info "daily statistic: #{attr_name}"

self[attr_name] = instance_eval(&attr_definitions[attr_name])
end

Expand Down
2 changes: 2 additions & 0 deletions app/services/charts/daily_statistic_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ def call

daily_statistic = ::DailyStatistic.find_or_create_by!(created_at_unixtimestamp: to_be_counted_date.to_i)
daily_statistic.from_scratch = from_scratch
Rails.logger.info "daily statistic attrs length: #{updated_attrs.length}"
daily_statistic.reset!(updated_attrs)
Rails.logger.info "daily statistic ckb_hodl_wave: #{daily_statistic.ckb_hodl_wave}"
daily_statistic
end

Expand Down

0 comments on commit 93a0755

Please sign in to comment.