Class: Tasker::Types::TaskRequest

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/tasker/types/task_request.rb

Overview

TaskRequest represents a request to perform a task within the system

It contains all the necessary information to identify, track, and execute a task including context data, metadata, and configuration for the task execution.

Instance Attribute Summary collapse

Instance Attribute Details

#bypass_stepsArray<String> (readonly)

Returns List of step names that should be bypassed during task execution.

Returns:

  • (Array<String>)

    List of step names that should be bypassed during task execution



53
# File 'lib/tasker/types/task_request.rb', line 53

attribute :bypass_steps, Types::Array.of(Types::String).default([].freeze)

#completeBoolean (readonly)

Returns Indicates whether the task has been completed.

Returns:

  • (Boolean)

    Indicates whether the task has been completed



45
# File 'lib/tasker/types/task_request.rb', line 45

attribute :complete, Types::Bool.default(false)

#contextHash (readonly)

Returns Context data required for task execution, containing task-specific information.

Returns:

  • (Hash)

    Context data required for task execution, containing task-specific information



25
# File 'lib/tasker/types/task_request.rb', line 25

attribute :context, Types::Hash

#initiatorString (readonly)

Returns The entity or system that initiated this task request.

Returns:

  • (String)

    The entity or system that initiated this task request



33
# File 'lib/tasker/types/task_request.rb', line 33

attribute :initiator, Types::String.default(Constants::UNKNOWN)

#nameString (readonly)

Returns The name of the task to be performed.

Returns:

  • (String)

    The name of the task to be performed



13
# File 'lib/tasker/types/task_request.rb', line 13

attribute :name, Types::Strict::String

#namespaceString (readonly)

Returns The namespace of the task to be performed.

Returns:

  • (String)

    The namespace of the task to be performed



17
# File 'lib/tasker/types/task_request.rb', line 17

attribute :namespace, Types::Strict::String.default('default')

#reasonString (readonly)

Returns The reason why this task was requested.

Returns:

  • (String)

    The reason why this task was requested



41
# File 'lib/tasker/types/task_request.rb', line 41

attribute :reason, Types::String.default(Constants::UNKNOWN)

#requested_atTime (readonly)

Returns Timestamp when the task was initially requested.

Returns:

  • (Time)

    Timestamp when the task was initially requested



57
# File 'lib/tasker/types/task_request.rb', line 57

attribute(:requested_at, Types::JSON::Time.default { Time.zone.now })

#source_systemString (readonly)

Returns The system from which this task originated.

Returns:

  • (String)

    The system from which this task originated



37
# File 'lib/tasker/types/task_request.rb', line 37

attribute :source_system, Types::String.default(Constants::UNKNOWN)

#statusString (readonly)

Returns Current status of the task (e.g., PENDING, IN_PROGRESS, COMPLETED, FAILED).

Returns:

  • (String)

    Current status of the task (e.g., PENDING, IN_PROGRESS, COMPLETED, FAILED)



29
# File 'lib/tasker/types/task_request.rb', line 29

attribute :status, Types::String.default(Constants::TaskStatuses::PENDING)

#tagsArray<String> (readonly)

Returns Tags associated with this task for categorization or filtering.

Returns:

  • (Array<String>)

    Tags associated with this task for categorization or filtering



49
# File 'lib/tasker/types/task_request.rb', line 49

attribute :tags, Types::Array.of(Types::String).default([].freeze)

#versionString (readonly)

Returns The version of the task to be performed.

Returns:

  • (String)

    The version of the task to be performed



21
# File 'lib/tasker/types/task_request.rb', line 21

attribute :version, Types::Strict::String.default('0.1.0')