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.Storage
Assembly: 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 IStorageManager 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, IStorageManager)
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, IStorageManager queueStorage)
Parameters
Type | Name | Description |
---|---|---|
System.String | uniqueDBConnection | The unique key for the db connection this item was saved to |
System.DateTimeOffset | committedDateTime | The date/time stamp the item was saved |
IStorageManager | queueStorage | A storage manager that has a queue implementation for saving queue messages |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of this operation |