Compare commits

...

28 Commits

Author SHA1 Message Date
khwezi 9f45b71f27 Merge pull request 'removed secrets from manifest, injecting them from cluster secret in namespace' (#35) from update into master
Reviewed-on: #35
2026-06-15 23:15:28 +02:00
Khwezi Mngoma 44f71348a5 removed secrets from manifest, injecting them from cluster secret in namespace
continuous-integration/drone/pr Build is passing
2026-06-15 23:15:00 +02:00
khwezi d57391f694 Merge pull request 'Updated nuget packages' (#34) from update into master
Reviewed-on: #34
2026-06-15 09:07:35 +02:00
Khwezi Mngoma 0f50f6f761 Updated nuget packages
continuous-integration/drone/pr Build is passing
2026-06-15 09:03:58 +02:00
khwezi 26e08e49a3 Merge pull request 'Updated merchant payment id handling' (#33) from payments into master
Reviewed-on: #33
2026-06-13 21:26:07 +02:00
Khwezi Mngoma 33baf27a9a Updated merchant payment id handling
continuous-integration/drone/pr Build is passing
2026-06-13 21:25:22 +02:00
khwezi e8cb47c007 Merge pull request 'Updated ledger handling' (#32) from payments into master
Reviewed-on: #32
2026-06-13 18:07:37 +02:00
Khwezi Mngoma 13b542f0cf Updated ledger handling
continuous-integration/drone/pr Build is passing
2026-06-13 18:07:03 +02:00
khwezi a91dd920ff Merge pull request 'Updated nuget packages' (#31) from payments into master
Reviewed-on: #31
2026-06-13 17:23:11 +02:00
Khwezi Mngoma 3e079a3726 Updated nuget packages
continuous-integration/drone/pr Build is passing
2026-06-13 17:21:26 +02:00
khwezi 8e81e0c0be Merge pull request 'Updated scheduler events' (#30) from payments into master
Reviewed-on: #30
2026-06-13 16:37:06 +02:00
Khwezi Mngoma c801901930 Updated scheduler events
continuous-integration/drone/pr Build is passing
2026-06-13 16:36:37 +02:00
khwezi 7a0f8d96cc Merge pull request 'Refactored valid payfast host list' (#29) from payments into master
Reviewed-on: #29
2026-06-13 12:12:45 +02:00
Khwezi Mngoma 496f728670 Refactored valid payfast host list
continuous-integration/drone/pr Build is passing
2026-06-13 12:11:20 +02:00
khwezi 81fb246ec6 Merge pull request 'Updated library references and configs' (#28) from payments into master
Reviewed-on: #28
2026-06-13 10:57:09 +02:00
Khwezi Mngoma 1710806038 Updated library references and configs
continuous-integration/drone/pr Build is passing
2026-06-13 10:56:38 +02:00
khwezi f215c3a2f7 Merge pull request 'Updated core' (#27) from payments into master
Reviewed-on: #27
2026-06-05 06:06:03 +02:00
Khwezi Mngoma 6d7027f10a Updated core
continuous-integration/drone/pr Build is passing
2026-06-05 06:05:13 +02:00
khwezi 3aba434859 Merge pull request 'Upgraded quartz' (#26) from payments into master
Reviewed-on: #26
2026-06-03 11:48:08 +02:00
Khwezi Mngoma 90569c6271 Upgraded quartz
continuous-integration/drone/pr Build is passing
2026-06-03 11:16:16 +02:00
khwezi b53e856ea2 Merge pull request 'Updates core system' (#25) from payments into master
Reviewed-on: #25
2026-06-03 08:46:21 +02:00
Khwezi Mngoma 02c21319e6 Updates core system
continuous-integration/drone/pr Build is passing
Refactored k8s manifest
2026-06-03 08:45:21 +02:00
khwezi b343dbe668 Merge pull request 'Refactored manifest' (#24) from payments into master
Reviewed-on: #24
2026-06-02 08:11:17 +02:00
Khwezi Mngoma d4c005602e Refactored manifest
continuous-integration/drone/pr Build is passing
2026-06-02 08:09:35 +02:00
khwezi 783ca2e9c5 Merge pull request 'Stable run' (#23) from payments into master
Reviewed-on: #23
2026-06-02 00:30:13 +02:00
Khwezi Mngoma 3d506cffd1 Stable run
continuous-integration/drone/pr Build is passing
2026-06-02 00:29:02 +02:00
khwezi cdc373562e Merge pull request 'Updated notification service' (#22) from migration into master
Reviewed-on: #22
2026-05-17 16:07:12 +02:00
Khwezi Mngoma f299e8952a Updated notification service
continuous-integration/drone/pr Build is passing
2026-05-17 16:06:46 +02:00
5 changed files with 52 additions and 78 deletions
@@ -8,7 +8,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.8" />
<PackageReference Include="LiteCharms.Features.MidrandBooks" Version="1.137.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.9" />
<PackageReference Include="Mediator.SourceGenerator" Version="3.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
@@ -17,7 +18,7 @@
<!-- Lite Charms Libraries -->
<ItemGroup>
<PackageReference Include="LiteCharms.Features" Version="1.32.0" />
<PackageReference Include="LiteCharms.Features" Version="1.137.0" />
</ItemGroup>
<!-- Shared Global Usings -->
+10 -12
View File
@@ -1,15 +1,12 @@
using LiteCharms.Features.Extensions;
using LiteCharms.Features.Mediator;
using LiteCharms.Features.MidrandBooks.Extensions;
using LiteCharmsScheduler.Workers;
using static LiteCharms.Features.Email.Extensions.Constants;
using static LiteCharms.Features.Extensions.Quartz;
var builder = Host.CreateApplicationBuilder(args);
builder.Services.AddMediator(options => options.Assemblies = new List<AssemblyReference>
{
typeof(Program).Assembly,
typeof(LiteCharms.Features.Shop.Notifications.Events.ProcessEmailNotificationsEvent).Assembly
}.AsReadOnly());
builder.Services.AddMediator();
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(TelemetryPipelineBehavior<,>));
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(LoggingPipelineBehavior<,>));
@@ -17,19 +14,20 @@ builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(LoggingPipelineB
builder.Services.AddEmailServices(builder.Configuration);
builder.Services.AddEmailServiceBus();
builder.Services.AddSalesServiceBus();
builder.Services.AddGeneralServiceBus();
builder.Services.AddQuartzScheduler(ShopSchedulerName, builder.Configuration);
builder.Services.AddHttpClient();
builder.Services.AddShopServices();
builder.Services.AddShopDatabase(builder.Configuration);
builder.Services.AddPayfastServices(builder.Configuration);
builder.Services.AddHashServices(builder.Configuration);
builder.Services.AddMidrandShopDatabase(builder.Configuration);
builder.Services.AddQuartzScheduler(MidrandShopSchedulerName, builder.Configuration);
builder.Services.AddHostedService<JobWorker>();
var host = builder.Build();
var schedulerFactory = host.Services.GetRequiredService<ISchedulerFactory>();
var scheduler = await schedulerFactory.GetScheduler(ShopSchedulerName);
var scheduler = await schedulerFactory.GetScheduler(MidrandShopSchedulerName);
if (!scheduler!.IsStarted)
await scheduler.Start();
+3 -16
View File
@@ -1,21 +1,8 @@
using LiteCharms.Features.Quartz.Abstractions;
using LiteCharms.Features.Shop.Notifications.Events;
namespace LiteCharmsScheduler.Workers
{
public class JobWorker(IJobOrchestrator jobOrchestrator, ILogger<JobWorker> logger, IConfiguration configuration) : BackgroundService
public class JobWorker(ILogger<JobWorker> logger) : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
string? emailProcessorCron = !string.IsNullOrWhiteSpace(configuration.GetSection("EmailProcessorCron").Value)
? configuration.GetSection("EmailProcessorCron").Value
: "0 */4 * * * ?";
var emailProcessorJob = ProcessEmailNotificationsEvent.Create();
await jobOrchestrator.ScheduleAsync(emailProcessorJob, emailProcessorCron!, stoppingToken);
logger.LogInformation("Startup jobs scheduled");
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken) =>
logger.LogInformation("Midrand Books jobs initialized");
}
}
+22 -9
View File
@@ -1,18 +1,31 @@
{
"Email": {
"Credentials": {
"Username": "shop@litecharms.co.za"
},
"Port": 465,
"Host": "mail.litecharms.co.za",
"UseSsl": true
"PayfastSettings": {
"CheckoutUrl": "https://sandbox.payfast.co.za/eng/process",
"ValidHosts": [
"www.payfast.co.za",
"sandbox.payfast.co.za",
"w1w.payfast.co.za",
"w2w.payfast.co.za",
"ips.payfast.co.za",
"api.payfast.co.za",
"payment.payfast.io"
]
},
"HasherSettings": {
"MinHashLength": 11
},
"BookshopS3Settings": {
"ServiceUrl": "http://192.168.1.177:30900",
"Region": "garage",
"BucketName": "bookshop",
"CdnBaseUrl": "https://bookshop.cdn.khongisa.co.za"
},
"EmailProcessorCron": "0 */5 * * * ?",
"Monitoring": {
"ApiKey": "",
"Address": "http://aspire-dashboard-service.aspire.svc.cluster.local:18889",
"ServiceName": "LiteCharms.LeadGenerator"
"ServiceName": "MidrandBooks.DEV"
},
"EmailProcessorCron": "0 */5 * * * ?",
"Logging": {
"LogLevel": {
"Default": "Information",
+14 -39
View File
@@ -18,19 +18,17 @@ data:
Email__Port: "465"
Email__UseSsl: "true"
EmailProcessorCron: "0 */5 * * * ?"
---
apiVersion: v1
kind: Secret
metadata:
name: scheduler-secrets
namespace: litecharms-scheduler-uat
type: Opaque
data:
connection-string-quartz: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNjaGVkdWxlci1kZXY7VXNlcm5hbWU9c2NoZWR1bGVyLWRldi11c2VyO1Bhc3N3b3JkPWtWVm1vV0tKM3h6Z1FYO1BlcnNpc3QgU2VjdXJpdHkgSW5mbz1UcnVl
connection-string: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNob3AtZGV2O1VzZXJuYW1lPXNob3AtZGV2LXVzZXI7UGFzc3dvcmQ9a1ZWbW9XS0ozeHpnUVg7UGVyc2lzdCBTZWN1cml0eSBJbmZvPVRydWU=
discord-webhook: aHR0cHM6Ly9kaXNjb3JkLmNvbS9hcGkvd2ViaG9va3MvMTUwMDIzMzEyOTYwNzAzNjk3MC9KYzc5endwMjlxYWpLbmoyYkR3cm5GR0RJci11ZGIyV2JIUDZTYjdpT0hCTWpQSUY3Vkw5eUVHTkJUSXpSOVVWVzI0bQ==
aspire-apikey: bWMzRzYzSzJqNVpPRXNpMEFqTW9qTFRYbTFLRVpGY3R6SUlqU3dEaVRHdXQ4cUdTa1B1V3d4R1AxUmJzY0pVbw==
email-password: JFpTLWVJQGlYbTVNUCRhfg==
HasherSettings__MinHashLength: "11"
BookshopS3Settings__ServiceUrl: "http://garage.garage.svc.cluster.local:3900"
BookshopS3Settings__Region: "garage"
BookshopS3Settings__BucketName: "bookshop"
BookshopS3Settings__CdnBaseUrl: "https://bookshop.cdn.khongisa.co.za"
PayfastSettings__CheckoutUrl: "https://sandbox.payfast.co.za/eng/process"
PayfastSettings__ValidHosts__0: "www.payfast.co.za"
PayfastSettings__ValidHosts__1: "sandbox.payfast.co.za"
PayfastSettings__ValidHosts__2: "ips.payfast.co.za"
PayfastSettings__ValidHosts__3: "api.payfast.co.za"
PayfastSettings__ValidHosts__4: "payment.payfast.io"
---
apiVersion: v1
kind: Service
@@ -75,29 +73,6 @@ spec:
envFrom:
- configMapRef:
name: scheduler-config
env:
- name: Email__Credentials__Password
valueFrom:
secretKeyRef:
name: scheduler-secrets
key: email-password
- name: ConnectionStrings__PostgresScheduler
valueFrom:
secretKeyRef:
name: scheduler-secrets
key: connection-string-quartz
- name: ConnectionStrings__PostgresShop
valueFrom:
secretKeyRef:
name: scheduler-secrets
key: connection-string
- name: ConnectionStrings__DiscordShop
valueFrom:
secretKeyRef:
name: scheduler-secrets
key: discord-webhook
- name: Monitoring__ApiKey
valueFrom:
secretKeyRef:
name: scheduler-secrets
key: aspire-apikey
- secretRef:
name: scheduler-secrets