Enforcing async/await in synchronous methods that were marked async.

This commit is contained in:
smcpeck 2017-02-23 11:59:37 -06:00
parent fa1540717b
commit a8288a93b0
4 changed files with 5 additions and 1 deletions

View file

@ -94,7 +94,6 @@ namespace Ombi.Api
request.AddHeader("X-Api-Key", apiKey);
request.AddJsonBody(options);
RadarrAddMovie result;
try
{
var policy = RetryHandler.RetryAndWaitPolicy((exception, timespan) => Log.Error(exception, "Exception when calling AddSeries for Sonarr, Retrying {0}", timespan), new TimeSpan[] {

View file

@ -202,6 +202,7 @@ namespace Ombi.Core.StatusChecker
public async Task<Uri> OAuth(string url, ISession session)
{
await Task.Yield();
var csrf = StringCipher.Encrypt(Guid.NewGuid().ToString("N"), "CSRF");
session[SessionKeys.CSRF] = csrf;

View file

@ -84,6 +84,8 @@ namespace Ombi.UI.Modules.Admin
private async Task<Response> ScheduleRun(string key)
{
await Task.Yield();
if (key.Equals(JobNames.PlexCacher, StringComparison.CurrentCultureIgnoreCase))
{
PlexContentCacher.CacheContent();

View file

@ -47,6 +47,8 @@ namespace Ombi.UI.Modules
public async Task<Response> Netflix(string title)
{
await Task.Yield();
var result = NetflixApi.CheckNetflix(title);
if (!string.IsNullOrEmpty(result.Message))