Interface IQueueableItemOnSave
Indicates the processing of this item can be placed on a queue
Whenever an item that implements this interface is successfully saved (and the system has UseStorageForTaskServiceQueue config setting set to true),
the system calls this function to allow it to appropriately add itself to a queue for processingInherited Members
Namespace: LemonEdge.API.Entities.Storage
Assembly: LemonEdge.API.dll
Syntax
public interface IQueueableItemOnSave : IBaseEntity, IEquatable<IBaseEntity>, INotifyPropertyChanged, INotifyPropertyChanging, ICloneableAsync, ICanTrackProperties
Remarks
The system uses this by ensuring IServerTask implements this and thus has the opportunity to add itself to an azure queue (or other IStorageService implementor)
This is useful as by default the task services can just poll the database for tasks and process them whenever they are found. However this is inefficient and prevents databases from being serverless.
The task service can be set to wake on queue items (meaning the service itself can be serverless), or poll queue items instead of the database. This enables the database to be serverless and power down when no tasks are to be processed.Methods
QueueItem(string, DateTimeOffset, IStorageService, string)
This item has been successfully saved by the platform, and now can be added to a queue for external processing
Declaration
Task QueueItem(string uniqueDBConnection, DateTimeOffset committedDateTime, IStorageService queueStorage, string queueName)
Parameters
Type | Name | Description |
---|---|---|
string | uniqueDBConnection | The unique key for the db connection this item was saved to |
DateTimeOffset | committedDateTime | The date/time stamp the item was saved |
IStorageService | queueStorage | A storage manager that has a queue implementation for saving queue messages |
string | queueName | Queue Name from Task Service |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of this operation |