Class: ActiveRecordMigrationUi::NotifyMigrationScriptAsDoneOrFail

Inherits:
Object
  • Object
show all
Includes:
Interactor
Defined in:
app/interactors/active_record_migration_ui/notify_migration_script_as_done_or_fail.rb

Instance Method Summary collapse

Instance Method Details

#callObject



5
6
7
8
9
10
11
12
13
14
# File 'app/interactors/active_record_migration_ui/notify_migration_script_as_done_or_fail.rb', line 5

def call
  sanity_checks!

  # Emit a message through the WebSocket to notify the front that the given
  # migration script version changes the state to the given final_state.
  ActionCable.server.broadcast ActiveRecordMigrationUi.ac_channel_name,
                               command: 'migrate',
                               version: context.version,
                               new_status: context.final_state
end