|
|
@ -176,23 +176,25 @@ namespace DiscoBot.gsmeet |
|
|
|
|
|
|
|
private Task CleanupNotifyDB(GSMeetSheetData sheetData) |
|
|
|
{ |
|
|
|
/* |
|
|
|
foreach(var n in sheetData.Sheet.NotifiedEvents) |
|
|
|
for(var i=sheetData.Sheet.NotifiedEvents.Count-1;i>=0;i--) |
|
|
|
{ |
|
|
|
var n = sheetData.Sheet.NotifiedEvents[i]; |
|
|
|
if(DateTimeOffset.UtcNow > n.Date) |
|
|
|
{ |
|
|
|
sheetData.Sheet.NotifiedEvents.Remove(n); |
|
|
|
gsmeetContext.Entry(n).State = EntityState.Deleted; |
|
|
|
} |
|
|
|
} |
|
|
|
foreach (var n in sheetData.Sheet.NotifiedUsers) |
|
|
|
for (var i = sheetData.Sheet.NotifiedUsers.Count - 1; i >= 0; i--) |
|
|
|
{ |
|
|
|
var n = sheetData.Sheet.NotifiedUsers[i]; |
|
|
|
if (DateTimeOffset.UtcNow > n.Date) |
|
|
|
{ |
|
|
|
sheetData.Sheet.NotifiedUsers.Remove(n); |
|
|
|
gsmeetContext.Entry(n).State = EntityState.Deleted; |
|
|
|
} |
|
|
|
} |
|
|
|
gsmeetContext.SaveChanges(); |
|
|
|
*/ |
|
|
|
return Task.CompletedTask; |
|
|
|
} |
|
|
|
|
|
|
|