1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 00:52:49 -05:00

delete expired grants job

This commit is contained in:
Kyle Spearrin
2018-10-09 10:23:52 -04:00
parent 5812915677
commit bfa6f68541
4 changed files with 45 additions and 0 deletions

View File

@ -6,5 +6,6 @@ namespace Bit.Core.Repositories
{
Task UpdateStatisticsAsync();
Task RebuildIndexesAsync();
Task DeleteExpiredGrantsAsync();
}
}

View File

@ -38,5 +38,16 @@ namespace Bit.Core.Repositories.SqlServer
commandTimeout: 86400);
}
}
public async Task DeleteExpiredGrantsAsync()
{
using(var connection = new SqlConnection(ConnectionString))
{
await connection.ExecuteAsync(
"[dbo].[Grant_DeleteExpired]",
commandType: CommandType.StoredProcedure,
commandTimeout: 86400);
}
}
}
}