Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1552 - Migrate jobs to infrastructure #1648

Merged
merged 3 commits into from
Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<ItemGroup>
<PackageReference Include="AutoMapper" Version="12.0.0" />
<PackageReference Include="Azure.Messaging.EventHubs" Version="5.7.5" />
<PackageReference Include="Microsoft.Azure.Devices" Version="1.38.2" />
<PackageReference Include="Microsoft.Azure.Devices.Provisioning.Service" Version="1.18.2" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Services
namespace AzureIoTHub.Portal.Application.Services
{
using System.Collections.Generic;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Services
namespace AzureIoTHub.Portal.Application.Services
{
using AzureIoTHub.Portal.Models.v10;
using AzureIoTHub.Portal.Shared.Models.v10;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Services
namespace AzureIoTHub.Portal.Application.Services
{
using AzureIoTHub.Portal.Domain.Entities;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Services
namespace AzureIoTHub.Portal.Application.Services
{
using System.Collections.Generic;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Services
namespace AzureIoTHub.Portal.Application.Services
{
using Models.v10;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Services
namespace AzureIoTHub.Portal.Application.Services
{
using System.Collections.Generic;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Services
namespace AzureIoTHub.Portal.Application.Services
{
using AzureIoTHub.Portal.Models.v10;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Services
namespace AzureIoTHub.Portal.Application.Services
{
using System.Collections.Generic;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Services
namespace AzureIoTHub.Portal.Application.Services
{
using System.Collections.Generic;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Services
namespace AzureIoTHub.Portal.Application.Services
{
using System.Collections.Generic;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Services
namespace AzureIoTHub.Portal.Application.Services
{
using System.Threading.Tasks;
using Shared.Models.v1._0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Services
namespace AzureIoTHub.Portal.Application.Services
{
using System.Threading.Tasks;
using Models.v10.LoRaWAN;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Services
namespace AzureIoTHub.Portal.Application.Services
{
using System.Threading.Tasks;
using AzureIoTHub.Portal.Models.v10.LoRaWAN;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@

<ItemGroup>
<PackageReference Include="Azure.Data.Tables" Version="12.7.1" />
<PackageReference Include="Azure.Messaging.EventHubs" Version="5.7.5" />
<PackageReference Include="Azure.Messaging.EventHubs.Processor" Version="5.7.5" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.14.1" />
<PackageReference Include="CsvHelper" Version="30.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.7" />
Expand All @@ -132,6 +134,9 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.0" />
<PackageReference Include="Polly.Extensions.Http" Version="3.0.0" />
<PackageReference Include="prometheus-net" Version="7.0.0" />
<PackageReference Include="Quartz" Version="3.5.0" />
<PackageReference Include="Quartz.Extensions.DependencyInjection" Version="3.5.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.23" />
<PackageReference Include="EntityFrameworkCore.Exceptions.PostgreSQL" Version="6.0.3" />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Extensions
namespace AzureIoTHub.Portal.Infrastructure.Extensions
{
using AzureIoTHub.Portal.Domain;
using Quartz;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Jobs
namespace AzureIoTHub.Portal.Infrastructure.Jobs
{
using System.Threading.Tasks;
using AzureIoTHub.Portal.Domain.Shared.Constants;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Jobs
namespace AzureIoTHub.Portal.Infrastructure.Jobs
{
using System.Threading.Tasks;
using AzureIoTHub.Portal.Domain.Exceptions;
using AzureIoTHub.Portal.Server.Services;
using AzureIoTHub.Portal.Application.Services;
using Microsoft.Extensions.Logging;
using Quartz;
using Shared.Models.v1._0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Jobs
namespace AzureIoTHub.Portal.Infrastructure.Jobs
{
using System.Threading.Tasks;
using AzureIoTHub.Portal.Domain.Shared.Constants;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Jobs
namespace AzureIoTHub.Portal.Infrastructure.Jobs
{
using System.Threading.Tasks;
using AzureIoTHub.Portal.Domain.Exceptions;
using AzureIoTHub.Portal.Server.Services;
using AzureIoTHub.Portal.Application.Services;
using Microsoft.Extensions.Logging;
using Quartz;
using Shared.Models.v1._0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Jobs
namespace AzureIoTHub.Portal.Infrastructure.Jobs
{
using System.Threading.Tasks;
using AzureIoTHub.Portal.Domain.Shared.Constants;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Jobs
namespace AzureIoTHub.Portal.Infrastructure.Jobs
{
using System.Threading.Tasks;
using AzureIoTHub.Portal.Domain.Exceptions;
using AzureIoTHub.Portal.Server.Services;
using AzureIoTHub.Portal.Application.Services;
using Microsoft.Extensions.Logging;
using Quartz;
using Shared.Models.v1._0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Jobs
namespace AzureIoTHub.Portal.Infrastructure.Jobs
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using Domain;
using AzureIoTHub.Portal.Application.Services;
using AzureIoTHub.Portal.Domain.Entities;
using Domain;
using Domain.Repositories;
using Services;
using Microsoft.Azure.Devices.Shared;
using Microsoft.Extensions.Logging;
using Quartz;
using System.Linq;

[DisallowConcurrentExecution]
public class SyncConcentratorsJob : IJob
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Jobs
namespace AzureIoTHub.Portal.Infrastructure.Jobs
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using Domain;
using AzureIoTHub.Portal.Application.Services;
using AzureIoTHub.Portal.Domain.Entities;
using Domain;
using Domain.Repositories;
using Services;
using Microsoft.Azure.Devices.Shared;
using Microsoft.Extensions.Logging;
using Quartz;
using System.Linq;

[DisallowConcurrentExecution]
public class SyncDevicesJob : IJob
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Jobs
namespace AzureIoTHub.Portal.Infrastructure.Jobs
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using AzureIoTHub.Portal.Application.Services;
using AzureIoTHub.Portal.Domain;
using AzureIoTHub.Portal.Domain.Entities;
using AzureIoTHub.Portal.Domain.Repositories;
using AzureIoTHub.Portal.Server.Services;
using Microsoft.Azure.Devices.Shared;
using Microsoft.Extensions.Logging;
using Quartz;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Jobs
namespace AzureIoTHub.Portal.Infrastructure.Jobs
{
using System;
using System.Threading.Tasks;
using AzureIoTHub.Portal.Server.Services;
using AzureIoTHub.Portal.Application.Services;
using AzureIoTHub.Portal.Shared.Models.v1._0;
using Microsoft.Extensions.Logging;
using Quartz;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Jobs
namespace AzureIoTHub.Portal.Infrastructure.Jobs
{
using System.Threading;
using System.Threading.Tasks;
using Domain;
using Microsoft.Extensions.Logging;
using Quartz;
using Azure.Messaging.EventHubs;
using Azure.Storage.Blobs;
using System.Threading;
using Azure.Messaging.EventHubs.Processor;
using Azure.Storage.Blobs;
using AzureIoTHub.Portal.Application.Services;
using AzureIoTHub.Portal.Models.v10.LoRaWAN;
using AzureIoTHub.Portal.Server.Services;
using Domain;
using Microsoft.Extensions.Logging;
using Quartz;

public class SyncLoRaDeviceTelemetryJob : IJob
{
Expand Down
Loading