Skip to content

Commit

Permalink
fix: last changed list should wait for new WithCount projection
Browse files Browse the repository at this point in the history
  • Loading branch information
jvandaal authored and ArneD committed May 30, 2024
1 parent f6ce3c2 commit df4e800
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/ParcelRegistry.Infrastructure/Schema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ public static class Schema
public const string Import = "ParcelRegistryImport";
public const string Legacy = "ParcelRegistryLegacy";
public const string Extract = "ParcelRegistryExtract";
public const string Syndication = "ParcelRegistrySyndication";
public const string ConsumerAddress = "ParcelRegistryConsumerAddress";
public const string BackOffice = "ParcelRegistryBackOffice";
public const string BackOfficeProjections = "ParcelRegistryBackOfficeProjections";
Expand All @@ -23,7 +22,6 @@ public static class MigrationTables
public const string Legacy = "__EFMigrationsHistoryLegacy";
public const string Extract = "__EFMigrationsHistoryExtract";
public const string RedisDataMigration = "__EFMigrationsHistoryDataMigration";
public const string Syndication = "__EFMigrationsHistorySyndication";
public const string ConsumerAddress = "__EFMigrationsHistoryConsumerAddress";
public const string BackOffice = "__EFMigrationsHistoryBackOffice";
public const string BackOfficeProjections = "__EFMigrationsHistoryBackOfficeProjections";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ namespace ParcelRegistry.Projections.LastChangedList.Console.Infrastructure.Modu
using Be.Vlaanderen.Basisregisters.Projector;
using Be.Vlaanderen.Basisregisters.Projector.ConnectedProjections;
using Be.Vlaanderen.Basisregisters.Projector.Modules;
using ParcelRegistry.Infrastructure;
using Legacy.ParcelDetailWithCountV2;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using LastChangedListContextMigrationFactory = LastChangedList.LastChangedListContextMigrationFactory;
using ParcelRegistry.Infrastructure;
using LastChangedListContextMigrationFactory = LastChangedListContextMigrationFactory;

public class LastChangedListConsoleModule : Module
{
Expand Down Expand Up @@ -61,7 +62,7 @@ private void RegisterProjectionSetup(ContainerBuilder builder)
private void RegisterProjections(ContainerBuilder builder)
{
var logger = _loggerFactory.CreateLogger<LastChangedListConsoleModule>();
var connectionString = _configuration.GetConnectionString("LastChangedList");
var connectionString = _configuration.GetConnectionString("LastChangedList")!;

builder.RegisterModule(new LastChangedListModule(connectionString, _services, _loggerFactory));

Expand All @@ -73,10 +74,10 @@ private void RegisterProjections(ContainerBuilder builder)
"\tTableName: {TableName}",
nameof(LastChangedListContext), LastChangedListContext.Schema, LastChangedListContext.MigrationsHistoryTable);

builder.Register(c =>
builder.Register(_ =>
new LastChangedListParcelCacheValidator(
_configuration.GetConnectionString("LegacyProjections"),
"ParcelRegistry.Projections.Legacy.ParcelDetailV2.ParcelDetailV2Projections"))
_configuration.GetConnectionString("LegacyProjections")!,
ParcelDetailV2Configuration.ProjectionStateName))
.AsSelf();

builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<ItemGroup>
<ProjectReference Include="..\ParcelRegistry.Infrastructure\ParcelRegistry.Infrastructure.csproj" />
<ProjectReference Include="..\ParcelRegistry.Projections.LastChangedList\ParcelRegistry.Projections.LastChangedList.csproj" />
<ProjectReference Include="..\ParcelRegistry.Projections.Legacy\ParcelRegistry.Projections.Legacy.csproj" />
</ItemGroup>

<Import Project="..\..\.paket\Paket.Restore.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public Instant VersionTimestamp
public class ParcelDetailV2Configuration : IEntityTypeConfiguration<ParcelDetailV2>
{
internal const string TableName = "ParcelDetailsWithCountV2";
public static readonly string ProjectionStateName = typeof(ParcelDetailV2Projections).FullName!;

public void Configure(EntityTypeBuilder<ParcelDetailV2> builder)
{
Expand Down

0 comments on commit df4e800

Please sign in to comment.