- Timestamp:
- 02/14/21 17:54:35 (4 years ago)
- Branches:
- master
- Children:
- 472dd7e
- Parents:
- 6e6f04b
- Location:
- Farmatiko
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/Controllers/FarmatikoController.cs
r6e6f04b rf554983 26 26 //_JSONservice.DownloadPharmaciesExcel(); 27 27 //_JSONservice.GetProcessedHealthcareWorkersFromJSON(); 28 //_JSONservice.GetProcessedHealthFacilitiesFromJSON(); 29 //_JSONservice.GetProcessedMedicinesFromJSON(); 30 //_JSONservice.GetProcessedPandemicsFromJSONApi(); 28 //await _JSONservice.GetProcessedHealthFacilitiesFromJSON(); 29 //await _JSONservice.GetProcessedMedicinesFromJSON(); 31 30 } 32 31 [HttpGet] -
Farmatiko/Program.cs
r6e6f04b rf554983 3 3 using System.Linq; 4 4 using System.Threading.Tasks; 5 using FarmatikoServices.Services; 5 6 using Microsoft.AspNetCore.Hosting; 6 7 using Microsoft.Extensions.Configuration; 8 using Microsoft.Extensions.DependencyInjection; 7 9 using Microsoft.Extensions.Hosting; 8 10 using Microsoft.Extensions.Logging; … … 22 24 { 23 25 webBuilder.UseStartup<Startup>(); 26 24 27 }); 25 28 } -
Farmatiko/Startup.cs
r6e6f04b rf554983 18 18 using FarmatikoServices.Infrastructure; 19 19 using System; 20 using Quartz; 21 using Quartz.Impl; 22 using Quartz.Spi; 23 using FarmatikoServices.Services.JobDTO; 24 20 25 namespace Farmatiko 21 26 { … … 23 28 { 24 29 readonly string MyAllowSpecificOrigins = "_myAllowSpecificOrigins"; 25 26 30 public Startup(IConfiguration configuration) 27 31 { … … 53 57 services.AddEntityFrameworkNpgsql().AddDbContext<FarmatikoDataContext>(opt => opt.UseNpgsql(connectionString)); 54 58 59 60 55 61 services.AddScoped<IPHRepo, PHRepo>(); 56 62 services.AddScoped<IRepository, Repository>(); 57 63 services.AddScoped<IAdminRepo, AdminRepo>(); 64 services.AddTransient<IUpdateDataRepo, UpdateDataRepo>(); 58 65 59 services.Add Scoped<IPHService, PHService>();66 services.AddTransient<IPHService, PHService>(); 60 67 services.AddTransient<IAdminService, AdminService>(); 61 68 services.AddTransient<IService, Service>(); … … 64 71 65 72 services.AddTransient<ILogger, Logger<ProcessJSONService>>(); 66 67 // services.AddTransient<ISystemService, SystemService>();68 73 69 74 … … 116 121 o.MemoryBufferThreshold = int.MaxValue; 117 122 });*/ 123 124 services.AddSingleton<IJobFactory, SingletonUpdateDataJobFactory>(); 125 services.AddSingleton<ISchedulerFactory, StdSchedulerFactory>(); 126 127 services.AddTransient<UpdateDataJob>(); 128 services.AddSingleton(new JobSchedule( 129 jobType: typeof(UpdateDataJob), 130 cronExpression: "0/30 * * * * ?")); 131 132 133 // "0 0 12 */7 * ?" 134 135 136 services.AddHostedService<UpdateDataHostedService>(); 118 137 119 138 } -
Farmatiko/appsettings.json
r6e6f04b rf554983 24 24 }, 25 25 "SecretKey": "PEJcK2bD4E2BKdNmAlUl", 26 "TokenIssuer": "FARMATIKOISSUER" 26 "TokenIssuer": "FARMATIKOISSUER", 27 "ifStartup": "true" 27 28 }
Note:
See TracChangeset
for help on using the changeset viewer.