-
Notifications
You must be signed in to change notification settings - Fork 0
Hangfire added #18
base: master
Are you sure you want to change the base?
Hangfire added #18
Conversation
@@ -0,0 +1,3 @@ | |||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mmikirtumov @lesley29
I saw it earlier in @lesley29 PR, but we don't have this dictionary file now. We were agreed to delete it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lesley29 I think that we considered to remove this file, if I am not mistaken :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, we don't have this file in "scalable arch" branch https://github.com/TinkoffCreditSystems/ISA/tree/scalable_architecture/src
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, will remove it :-)
@@ -40,10 +45,31 @@ public void ConfigureServices(IServiceCollection services) | |||
services.AddAppDependencies(); | |||
services.AddMvc(); | |||
services.AddAutoMapper(); | |||
services.AddHangfire((serviceProvider, config) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems better to move it to Tinkoff.Isa.Infrastructure project, do you agree? to avoid duplications in API, Scheduler, SchedulerUI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason to have Hangfire in API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess so
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can remove it?
@@ -60,6 +86,22 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF | |||
} | |||
|
|||
app.UseMvc(); | |||
|
|||
recurringJobManager.AddOrUpdate<JiraJob>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to add this reference to have an ability to configure new providers in main ISA project.
Further this code should be in Tinkoff.ISA.Jira, Tinkoff.ISA.Confluence and so on...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, are you sure about further code placement in ISA.Jira, ISA.Confluence, etc? I supposed that we will have a core job that will ask IKnowledgeProvider for data (is it possible to create a job per each registered provider?). Is it necessary to force providers to depend on Hangfire? Correct me, if I'm wrong.
@@ -40,10 +45,31 @@ public void ConfigureServices(IServiceCollection services) | |||
services.AddAppDependencies(); | |||
services.AddMvc(); | |||
services.AddAutoMapper(); | |||
services.AddHangfire((serviceProvider, config) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason to have Hangfire in API?
@@ -1,16 +1,21 @@ | |||
using System.IO; | |||
using AutoMapper; | |||
using Hangfire; | |||
using Hangfire.Common; | |||
using Hangfire.Mongo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need it here?
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Logging; | ||
using Tinkoff.ISA.AppLayer; | ||
using Tinkoff.ISA.AppLayer.Jobs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jobs in API?
using Tinkoff.ISA.Infrastructure.Settings; | ||
using Tinkoff.ISA.DAL; | ||
using Tinkoff.ISA.DAL.Common; | ||
using Tinkoff.ISA.Infrastructure.Configuration; | ||
using Tinkoff.ISA.Infrastructure.Extensions; | ||
using Tinkoff.ISA.Infrastructure.MongoDb; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see any reason to add reference with MongoDb here.
@@ -40,10 +45,31 @@ public void ConfigureServices(IServiceCollection services) | |||
services.AddAppDependencies(); | |||
services.AddMvc(); | |||
services.AddAutoMapper(); | |||
services.AddHangfire((serviceProvider, config) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can remove it?
@@ -16,7 +16,7 @@ | |||
|
|||
namespace Tinkoff.ISA.AppLayer.Jobs | |||
{ | |||
internal class ConfluenceJob : IJob | |||
public class ConfluenceJob : IJob |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to move this to another project
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:5000", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's change the port it can bring a conflict :)
_configuration = builder.Build(); | ||
} | ||
|
||
// This method gets called by the runtime. Use this method to add services to the container. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comment :)
}); | ||
} | ||
|
||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment remove)
{ | ||
var logSettings = _configuration.GetSection("Logging").Get<LoggingSettings>(); | ||
|
||
app.UseSerilog(loggerFactory, logSettings, "isa-.log"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can change the logger name instead of isa-.log isa-hangfire.log?
{ | ||
CreateWebHostBuilder(args).UseUrls("http://*:5000").Build().Run(); | ||
return CreateWebHostBuilder(args).UseUrls("http://*:5000").Build().RunAsync(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the reason to change it to RunAsync? Is there any other processes?
Is there any difference in runtime level?
BackupStrategy = MongoBackupStrategy.Collections | ||
} | ||
}); | ||
}); | ||
} | ||
|
||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove also here :)
return Task.CompletedTask; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new line in the end of file
@@ -1,16 +1,21 @@ | |||
using System.IO; | |||
using AutoMapper; | |||
using Hangfire; | |||
using Hangfire.Common; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused directive
@@ -40,10 +45,31 @@ public void ConfigureServices(IServiceCollection services) | |||
services.AddAppDependencies(); | |||
services.AddMvc(); | |||
services.AddAutoMapper(); | |||
services.AddHangfire((serviceProvider, config) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess so
@@ -60,6 +86,22 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF | |||
} | |||
|
|||
app.UseMvc(); | |||
|
|||
recurringJobManager.AddOrUpdate<JiraJob>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, are you sure about further code placement in ISA.Jira, ISA.Confluence, etc? I supposed that we will have a core job that will ask IKnowledgeProvider for data (is it possible to create a job per each registered provider?). Is it necessary to force providers to depend on Hangfire? Correct me, if I'm wrong.
"ConnectionStrings": { | ||
"MongoDb": "" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new line :)
Related to Issue #14 |
work in progress :-)
feel free to add any comments please