Function overrideWorkerSchema

  • Overrides an existing worker configuration in the framework.

    This function partially updates a previously registered worker with new configuration. Only the provided fields will be updated, other fields remain unchanged.

    Parameters

    • workerSchema: TWorkerSchema

      Partial worker configuration object

      • workerName

        Unique worker identifier (must exist)

      • strategyName

        Optional: Strategy to run

      • exchangeName

        Optional: Exchange to run on

      • callbacks

        Optional: Lifecycle callbacks

    Returns Promise<IWorkerSchema>

    overrideWorkerSchema({
    workerName: "my-worker",
    strategyName: "another-strategy", // Only update the strategy
    });