Class PollingResourceRunner<TResource>
- Namespace
 - FoundationaLLM.Common.Clients
 
- Assembly
 - FoundationaLLM.Common.dll
 
Runs a resource using a polling mechanism to check for completion.
public class PollingResourceRunner<TResource> where TResource : ResourceBase, IRunnableResource
  Type Parameters
TResourceThe type of the runnable resource to run.
- Inheritance
 - 
      
      PollingResourceRunner<TResource>
 
- Inherited Members
 
- Extension Methods
 
Methods
Start(string, IResourceProviderService, TResource, TimeSpan, TimeSpan, ILogger, UnifiedUserIdentity, CancellationToken)
Runs the resource and waits for it to complete.
public static Task<bool> Start(string instanceId, IResourceProviderService resourceProviderService, TResource resource, TimeSpan pollingInterval, TimeSpan maxWaitInterval, ILogger logger, UnifiedUserIdentity userIdentity, CancellationToken cancellationToken = default)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
resourceProviderServiceIResourceProviderServiceThe resource provider service that manages the runnable resource.
resourceTResourceThe runnable resource to run.
pollingIntervalTimeSpanThe interval to poll for the status.
maxWaitIntervalTimeSpanThe maximum interval to wait for the resource run to complete.
loggerILoggerThe logger used for logging.
userIdentityUnifiedUserIdentityThe identity of the user driving the run.
cancellationTokenCancellationTokenThe cancellation token indicating the need to cancel the run.