Class: VisitPageDailyRefresh

Inherits:
ApplicationRecord show all
Defined in:
app/models/visit_page_daily_refresh.rb

Overview

Durable completion marker for one VisitPageDailyCount calendar-day rebuild.
A separate marker is necessary because a day with zero matching visits is a
valid completed result and therefore cannot be inferred from count rows.

Constant Summary

Constants included from Models::Schedulable

Models::Schedulable::SIMPLE_FORM_OPTIONS

Instance Attribute Summary collapse

Method Summary

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Models::Schedulable

config

Methods included from Models::AfterCommittable

#after_commit

Methods included from Models::EventPublishable

#publish_event

Instance Attribute Details

#completed_atTime

Returns When the refresh finished.

Returns:

  • (Time)

    When the refresh finished.



11
# File 'app/models/visit_page_daily_refresh.rb', line 11

validates :visit_date, :completed_at, presence: true

#page_countInteger

Returns Number of page rows written.

Returns:

  • (Integer)

    Number of page rows written.



17
18
# File 'app/models/visit_page_daily_refresh.rb', line 17

validates :source_visits_count, :page_count,
numericality: { only_integer: true, greater_than_or_equal_to: 0 }

#source_visits_countInteger

Returns Number of source visit rows considered.

Returns:

  • (Integer)

    Number of source visit rows considered.



17
18
# File 'app/models/visit_page_daily_refresh.rb', line 17

validates :source_visits_count, :page_count,
numericality: { only_integer: true, greater_than_or_equal_to: 0 }

#visit_dateDate

Returns Calendar day the refresh covers.

Returns:

  • (Date)

    Calendar day the refresh covers.



11
# File 'app/models/visit_page_daily_refresh.rb', line 11

validates :visit_date, :completed_at, presence: true