class Task::Fetch::Thread
- Task::Fetch::Thread
- Task
- Reference
- Object
Overview
Fetch a thread.
Included Modules
Defined in:
models/task/fetch/thread.crConstant Summary
-
Log =
::Log.for(self)
Class Method Summary
-
.find_or_new(options)
Finds an existing task or instantiates a new task.
-
.find_or_new(**options)
Finds an existing task or instantiates a new task.
-
.merge_into(from, into)
Merges tasks.
Instance Method Summary
-
#_association_source
Identifies the actor following the thread.
-
#_association_thread
Identifies a thread.
-
#_belongs_to_setter_for_source(source_ : ActivityPub::Actor, update_associations = true) : ActivityPub::Actor
Identifies the actor following the thread.
- #after_save
- #been_fetched : Set(String)
- #been_fetched=(been_fetched : Set(String))
-
#best_root
Finds the best root object.
-
#follow?
Indicates whether a follow relationship exists for the thread.
-
#path_to
Returns the path to the thread index page.
-
#perform(maximum = 100)
Fetches objects in the thread.
-
#source(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Actor
Identifies the actor following the thread.
-
#source=(source_ : ActivityPub::Actor) : ActivityPub::Actor
Identifies the actor following the thread.
-
#source?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Actor | Nil
Identifies the actor following the thread.
- #state : State
- #state=(state : State)
-
#thread : String
Identifies a thread.
-
#thread=(thread : String) : String
Identifies a thread.
Instance methods inherited from module Task::Fetch::Fetcher
complete!
complete!,
failures(*args, **options)failures(*args, **options, &) failures, interrupted? interrupted?, last_success_at(*args, **options)
last_success_at(*args, **options, &) last_success_at
Instance methods inherited from module Task::ConcurrentTask
fiber
fiber,
fiber_name
fiber_name
Instance methods inherited from class Task
backtrace : Array(String) | Nil
backtrace,
backtrace=(backtrace : Array(String) | Nil)
backtrace=,
complete : Bool
complete,
complete=(complete : Bool)
complete=,
gone?
gone?,
last_attempt_at : Time | Nil
last_attempt_at,
last_attempt_at=(last_attempt_at : Time | Nil)
last_attempt_at=,
next_attempt_at : Time | Nil
next_attempt_at,
next_attempt_at=(next_attempt_at : Time | Nil)
next_attempt_at=,
past_due?(now = Time.utc)
past_due?,
perform
perform,
runnable?
runnable?,
running : Bool
running,
running=(running : Bool)
running=,
schedule(next_attempt_at : Time | Nil = nil)
schedule,
source_iri : String
source_iri,
source_iri=(source_iri : String)
source_iri=,
subject_iri : String
subject_iri,
subject_iri=(subject_iri : String)
subject_iri=
Class methods inherited from class Task
clean_up_running_tasks
clean_up_running_tasks,
destroy_old_tasks
destroy_old_tasks,
priority
priority,
priority=(priority : Int32)
priority=,
scheduled(now = Time.utc, reserve = false)
scheduled
Instance methods inherited from module Ktistec::Model::Polymorphic
as_a(as _as : T.class) : T forall T
as_a,
type : String
type,
type=(type : String)
type=
Macros inherited from module Ktistec::Model::Polymorphic
find(_id id, *, as _as)find(*, as _as, **options) find
Instance methods inherited from module Ktistec::Model::Common
created_at : Time
created_at,
created_at=(created_at : Time)
created_at=,
updated_at : Time
updated_at,
updated_at=(updated_at : Time)
updated_at=
Instance methods inherited from module Ktistec::Model::InstanceMethods
==(other)
==,
_run_validations
_run_validations,
_save_model(skip_validation = false)
_save_model,
_serialize_graph(nodes, association = nil, index = nil, skip_associated = false)
_serialize_graph,
assign(properties : Hash(String, Any), *, _strict : Bool = false) forall Anyassign(*, _strict : Bool = false, **properties) assign, changed!(*properties : Symbol) changed!, changed?
changed?(*properties : Symbol) changed?, clear!
clear!(*properties : Symbol) clear!, destroy destroy, destroyed? destroyed?, errors errors, hash(hasher) hash, inspect(io : IO) inspect, new_record? new_record?, reload! reload!, save(skip_validation = false, skip_associated = false) save, serialize_graph(skip_associated = false) serialize_graph, table_name table_name, to_h to_h, to_json(json : JSON::Builder) to_json, to_s(io : IO) to_s, update_property(property, value) update_property, valid?(skip_associated = false) valid?, validate(skip_associated = false) validate
Constructor methods inherited from module Ktistec::Model::InstanceMethods
new(properties : Hash(String, Any), *, _strict : Bool = false) forall Anynew(*, _strict : Bool = false, **properties) new
Macros inherited from module Ktistec::Model::InstanceMethods
belongs_to(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil)
belongs_to,
derived(decl, *, aliased_to)
derived,
has_many(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil)
has_many,
has_one(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil)
has_one,
validates(property, &block)
validates
Instance methods inherited from module Ktistec::Model
id : Int64 | Nil
id,
id=(id : Int64 | Nil)
id=
Class Method Detail
Finds an existing task or instantiates a new task.
If #thread
(or subject_iri
) is passed as an option, search
for the root of the thread, and use that value. This ensures
that new tasks always point at roots.
Finds an existing task or instantiates a new task.
If #thread
(or subject_iri
) is passed as an option, search
for the root of the thread, and use that value. This ensures
that new tasks always point at roots.
Merges tasks.
Should be used in places where an object's thread property is changed. Ensures that only one task exists for a thread.
Instance Method Detail
Identifies a thread.
This value may change as the thread is extended toward its root.
Identifies the actor following the thread.
Finds the best root object.
This will be the actual root object, if the root object has been fetched and is cached. Otherwise, it will be an object in the incomplete thread.
Fetches objects in the thread.
On each invocation, performs at most maximum
(default 100)
fetches/network requests for new objects.
Identifies the actor following the thread.
Identifies the actor following the thread.
Identifies the actor following the thread.
Identifies a thread.
This value may change as the thread is extended toward its root.
Identifies a thread.
This value may change as the thread is extended toward its root.