Class: Prosody::Commands::Execute
- Defined in:
- lib/prosody/processor.rb,
sig/processor.rbs
Overview
Command to execute a task with the given parameters
Instance Attribute Summary collapse
-
#block ⇒ ^() -> void
readonly
The block of code to execute.
-
#callback ⇒ ^(bool, untyped) -> bool
readonly
Callback to invoke when execution completes or fails.
-
#carrier ⇒ Hash[String, String]
readonly
OpenTelemetry context carrier for trace propagation.
-
#event_context ⇒ Hash[Symbol, untyped]
readonly
Structured event fields for error reporting.
-
#task_id ⇒ String
readonly
Task identifier for logging and debugging.
-
#token ⇒ CancellationToken
readonly
Cancellation token for this task.
Instance Method Summary collapse
-
#initialize(task_id, carrier, event_context, block, callback, token) ⇒ Object
constructor
Creates a new execute command with all required parameters.
Constructor Details
#initialize(task_id, carrier, event_context, block, callback, token) ⇒ Object
Creates a new execute command with all required parameters
82 83 84 85 86 87 88 89 |
# File 'lib/prosody/processor.rb', line 82 def initialize(task_id, carrier, event_context, block, callback, token) @task_id = task_id @carrier = carrier @event_context = event_context @block = block @callback = callback @token = token end |
Instance Attribute Details
#block ⇒ ^() -> void (readonly)
The block of code to execute
66 67 68 |
# File 'lib/prosody/processor.rb', line 66 def block @block end |
#callback ⇒ ^(bool, untyped) -> bool (readonly)
Callback to invoke when execution completes or fails
69 70 71 |
# File 'lib/prosody/processor.rb', line 69 def callback @callback end |
#carrier ⇒ Hash[String, String] (readonly)
OpenTelemetry context carrier for trace propagation
60 61 62 |
# File 'lib/prosody/processor.rb', line 60 def carrier @carrier end |
#event_context ⇒ Hash[Symbol, untyped] (readonly)
Structured event fields for error reporting
63 64 65 |
# File 'lib/prosody/processor.rb', line 63 def event_context @event_context end |
#task_id ⇒ String (readonly)
Task identifier for logging and debugging
57 58 59 |
# File 'lib/prosody/processor.rb', line 57 def task_id @task_id end |
#token ⇒ CancellationToken (readonly)
Cancellation token for this task
72 73 74 |
# File 'lib/prosody/processor.rb', line 72 def token @token end |