runInWork | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function runInWork

    • Run a function inside work and commit it

      Type Parameters

      • T

      Parameters

      • func: () => T | Promise<T>
      • Optionaloptions: WorkOptions & { autoRetry?: boolean; maxRetries?: number }

      Returns Promise<T>

      If the function throws, the work is rolled back and the exception is rethrown