Adjust Stored Request Data
This feature is available exclusively through the extension package: TickerQ.EntityFrameworkCore.
Adjust Store/Retrieve
data
- Current:
When we stored the request we used the helper: Storing jobs in database
code-line 3
:csharpRequest = TickerHelper.CreateTickerRequest<string>("Hello")
CreateTickerRequest
compresses the data intoGZip
and stores in database asByteArray
.
- Update:
Once you decide against using
TickerHelper
for data storage and opt to create your own mechanism, you must also override the data retrieval method.csharpRequest = //your code
Override the retrieving request.
Override the method
GetRequestValueAsync
ofTickerController
in your class:csharppublic class MyFirstExample : TickerController { [TickerFunction(FunctionName: "ExampleTicker")] public async Task ExampleTicker(TickerFunctionContext<string> tickerContext, CancellationToken cancellationToken) { await tickerContext.Request.Value; // Outputs GetRequestValueAsync... } public override Task<T> GetRequestValueAsync<T>(Guid tickerId, TickerType tickerType) { // retrieve stored request data code... } }