private static RecentInvocationEntry Convert(IRecentFunctionEntry entity) { var snapshot = entity.ConvertToSnapshot(); var metadata = RecentInvocationEntry.CreateMetadata(snapshot); return(RecentInvocationEntry.Create(metadata)); }
public void CreateOrUpdate(FunctionInstanceSnapshot snapshot, DateTimeOffset timestamp) { if (snapshot == null) { throw new ArgumentNullException("snapshot"); } string innerId = CreateInnerId(timestamp, snapshot.Id); _store.CreateOrUpdate(innerId, RecentInvocationEntry.CreateMetadata(snapshot), String.Empty); }
private async Task <IResultSegment <RecentInvocationEntry> > Read3Async( FunctionId functionId, int maximumResults, string continuationToken) { var queryParams = new RecentFunctionQuery { FunctionId = functionId, MaximumResults = maximumResults, Start = DateTime.MinValue, End = DateTime.MaxValue }; var segment = await _reader.GetRecentFunctionInstancesAsync(queryParams, continuationToken); var results = Array.ConvertAll(segment.Results, item => RecentInvocationEntry.Create(RecentInvocationEntry.CreateMetadata(item.ConvertToSnapshot()))); return(new ResultSegment <RecentInvocationEntry>(results, segment.ContinuationToken)); }
public void CreateOrUpdate(FunctionInstanceSnapshot snapshot, DateTimeOffset timestamp) { string innerId = CreateInnerId(snapshot.ParentId.Value, timestamp, snapshot.Id); _store.CreateOrUpdate(innerId, RecentInvocationEntry.CreateMetadata(snapshot), String.Empty); }
public void CreateOrUpdate(FunctionInstanceSnapshot snapshot, WebJobRunIdentifier webJobRunId, DateTimeOffset timestamp) { string innerId = CreateInnerId(webJobRunId, timestamp, snapshot.Id); _store.CreateOrUpdate(innerId, RecentInvocationEntry.CreateMetadata(snapshot), String.Empty); }