Class: SearchResourceUpdateWorker

Inherits:
Object
  • Object
show all
Includes:
MassSearchWorker
Defined in:
app/workers/search_resource_update_worker.rb

Overview

Generic iterable worker for mass updates that follow the assign-attributes + save pattern.

Used by mass action methods that assign resource params and optionally run
the search's #normalize_for_mass_update hook before saving each record.
The hook defaults to a no-op (returns true) on the Search base class.

Expected action_params keys:
resource_params: Hash – attributes to assign_attributes on each resource

Enqueued by mass action methods that return { status: :ok, job_id: jid }.