Class: Synapse::Command::RetryScheduler Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/synapse/command/gateway/retry_scheduler.rb

Overview

This class is abstract.

Represents a mechanism that decides whether or not to dispatch a command when previous attempts resulted in an exception being raised.

Direct Known Subclasses

IntervalRetryScheduler

Instance Method Summary collapse

Instance Method Details

#schedule(command, failures, dispatcher) ⇒ Boolean

Inspects the given command message that failed due to an exception

The given list of failures contains exceptions that have occured each time the command was dispatched by the command bus. It includes the most recent failure at the end of the list.

The return value of this method indicates whether or not the command has been scheduled for a retry. If it has, the callback for the command should not be invoked. Otherwise, the failure will be interpreted as terminal and the callback will be invoked with the last recorded failure.

Parameters:

Returns:

  • (Boolean)


23
# File 'lib/synapse/command/gateway/retry_scheduler.rb', line 23

def schedule(command, failures, dispatcher); end