Class TaskService
Assembly: LemonEdge.Database.Connector.dll
Syntax
[Obsolete("Task service is now executed via hosted services found in LemonEdge.Tasks")]
public class TaskService : ITaskService, IDisposable
Constructors
TaskService(ILogger, IDatabaseInfoManager, IServiceContext, IEntityContextFactory, IEntityDescriptorFactory, IDomainContextEventHandler, IStorageServiceFactory, IOptions<CacheSettings>, IOptions<MessageSettings>, IOptions<TaskServiceSettings>, CancellationToken)
Declaration
public TaskService(ILogger log, IDatabaseInfoManager databaseInfoManager, IServiceContext services, IEntityContextFactory entityContextFactory, IEntityDescriptorFactory entityDescriptorFactory, IDomainContextEventHandler eventHandler, IStorageServiceFactory storageServiceFactory, IOptions<CacheSettings> cacheSettings, IOptions<MessageSettings> messageSettings, IOptions<TaskServiceSettings> taskServiceSettings, CancellationToken cancel = default)
Parameters
Properties
IsRunning
Returns true if the task service is currently running
Declaration
public bool IsRunning { get; }
Property Value
Methods
Dispose()
Declaration
Dispose(bool)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
bool |
disposing |
|
HasStopped()
Declaration
public Task<bool> HasStopped()
Returns
Pause()
Declaration
ProcessTask(bool, IDatabaseInfo, long?, Guid?, object)
Declaration
public Task<bool> ProcessTask(bool waitForTask, IDatabaseInfo dbInfo, long? accountId, Guid? taskId, object queueRemovalHandler)
Parameters
Returns
ProcessTaskFromQueue(string)
Declaration
public Task ProcessTaskFromQueue(string queueMessage)
Parameters
Type |
Name |
Description |
string |
queueMessage |
|
Returns
SetCancellationToken(CancellationToken)
Declaration
public void SetCancellationToken(CancellationToken cancel)
Parameters
SetFileOutput(string)
Sets a path to a file to log the processing of all tasks by the sevice to
Declaration
public void SetFileOutput(string filePath)
Parameters
Type |
Name |
Description |
string |
filePath |
A path to file to log all task activity to
|
Shutdown()
Declaration
Returns
StartAsync()
Declaration
Returns
StartOnNewThread()
Starts the service processing any IServerTask on the queue
Declaration
public void StartOnNewThread()
Stop()
Declaration
Implements
Extension Methods