Class: PostProxy::PostSync
Overview
A record of one post pull for a profile — the sync fired when the profile connects, the recurring poll, or a backfill.
Instance Attribute Summary collapse
-
#backfill_from ⇒ Object
Returns the value of attribute backfill_from.
-
#completed_at ⇒ Object
Returns the value of attribute completed_at.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#error ⇒ Object
Returns the value of attribute error.
-
#id ⇒ Object
Returns the value of attribute id.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#oldest_posted_at ⇒ Object
Returns the value of attribute oldest_posted_at.
-
#posts_imported ⇒ Object
Returns the value of attribute posts_imported.
-
#posts_seen ⇒ Object
Returns the value of attribute posts_seen.
-
#profile_id ⇒ Object
Returns the value of attribute profile_id.
-
#started_at ⇒ Object
Returns the value of attribute started_at.
-
#status ⇒ Object
Returns the value of attribute status.
-
#trigger ⇒ Object
Returns the value of attribute trigger.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ PostSync
constructor
A new instance of PostSync.
Methods inherited from Model
Constructor Details
#initialize(**attrs) ⇒ PostSync
Returns a new instance of PostSync.
557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
# File 'lib/postproxy/types.rb', line 557 def initialize(**attrs) @started_at = nil @completed_at = nil @posts_seen = 0 # Posts that were new and got created — lower than `posts_seen` whenever # the run re-read posts you already have. @posts_imported = 0 @backfill_from = nil # Publish date of the oldest post the run reached. @oldest_posted_at = nil @error = nil super @started_at = parse_time(@started_at) @completed_at = parse_time(@completed_at) @backfill_from = parse_time(@backfill_from) @oldest_posted_at = parse_time(@oldest_posted_at) @created_at = parse_time(@created_at) end |
Instance Attribute Details
#backfill_from ⇒ Object
Returns the value of attribute backfill_from.
553 554 555 |
# File 'lib/postproxy/types.rb', line 553 def backfill_from @backfill_from end |
#completed_at ⇒ Object
Returns the value of attribute completed_at.
553 554 555 |
# File 'lib/postproxy/types.rb', line 553 def completed_at @completed_at end |
#created_at ⇒ Object
Returns the value of attribute created_at.
553 554 555 |
# File 'lib/postproxy/types.rb', line 553 def created_at @created_at end |
#error ⇒ Object
Returns the value of attribute error.
553 554 555 |
# File 'lib/postproxy/types.rb', line 553 def error @error end |
#id ⇒ Object
Returns the value of attribute id.
553 554 555 |
# File 'lib/postproxy/types.rb', line 553 def id @id end |
#kind ⇒ Object
Returns the value of attribute kind.
553 554 555 |
# File 'lib/postproxy/types.rb', line 553 def kind @kind end |
#oldest_posted_at ⇒ Object
Returns the value of attribute oldest_posted_at.
553 554 555 |
# File 'lib/postproxy/types.rb', line 553 def oldest_posted_at @oldest_posted_at end |
#posts_imported ⇒ Object
Returns the value of attribute posts_imported.
553 554 555 |
# File 'lib/postproxy/types.rb', line 553 def posts_imported @posts_imported end |
#posts_seen ⇒ Object
Returns the value of attribute posts_seen.
553 554 555 |
# File 'lib/postproxy/types.rb', line 553 def posts_seen @posts_seen end |
#profile_id ⇒ Object
Returns the value of attribute profile_id.
553 554 555 |
# File 'lib/postproxy/types.rb', line 553 def profile_id @profile_id end |
#started_at ⇒ Object
Returns the value of attribute started_at.
553 554 555 |
# File 'lib/postproxy/types.rb', line 553 def started_at @started_at end |
#status ⇒ Object
Returns the value of attribute status.
553 554 555 |
# File 'lib/postproxy/types.rb', line 553 def status @status end |
#trigger ⇒ Object
Returns the value of attribute trigger.
553 554 555 |
# File 'lib/postproxy/types.rb', line 553 def trigger @trigger end |