Skip to content

Commit

Permalink
Merge pull request #58 from MaxTheWhale/max-fix-issue-57
Browse files Browse the repository at this point in the history
Fix map lookup in timeline stats functions
  • Loading branch information
felixclase authored Apr 20, 2023
2 parents fb691e8 + 2fb4441 commit 737988c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/Hangfire.Storage.SQLite/SQLiteMonitoringApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ private Dictionary<DateTime, long> GetTimelineStats(HangfireDbContext connection
var result = new Dictionary<DateTime, long>();
for (var i = 0; i < stringDates.Count; i++)
{
var value = valuesAggregatorMap[valuesAggregatorMap.Keys.ElementAt(i)];
var value = valuesAggregatorMap[$"stats:{type}:{stringDates[i]}"];
result.Add(dates[i], value.ToInt64());
}

Expand Down Expand Up @@ -225,7 +225,7 @@ private Dictionary<DateTime, long> GetHourlyTimelineStats(HangfireDbContext conn
var result = new Dictionary<DateTime, long>();
for (var i = 0; i < dates.Count; i++)
{
var value = valuesAggregatorMap[valuesAggregatorMap.Keys.ElementAt(i)];
var value = valuesAggregatorMap[$"stats:{type}:{dates[i]:yyyy-MM-dd-HH}"];
result.Add(dates[i], value.ToInt64());
}

Expand Down

0 comments on commit 737988c

Please sign in to comment.