From b1fbc61d3667bc8743104301b95bba3e3e474b02 Mon Sep 17 00:00:00 2001 From: Roman Boykov Date: Mon, 12 Sep 2022 23:36:38 +0300 Subject: [PATCH] code review --- src/Horarium/Handlers/RunnerJobs.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Horarium/Handlers/RunnerJobs.cs b/src/Horarium/Handlers/RunnerJobs.cs index 4480a32..de2be00 100644 --- a/src/Horarium/Handlers/RunnerJobs.cs +++ b/src/Horarium/Handlers/RunnerJobs.cs @@ -96,12 +96,11 @@ private async Task GetReadyJob() _horariumLogger.Error("Ошибка получения джоба из базы", ex); } + if (job == null) return null; + try { - if (job != null) - { - return job.ToJob(_jsonSerializerSettings); - } + return job.ToJob(_jsonSerializerSettings); } catch (Exception ex) {