RetrieveUpdateProductBatchResultsTask.ProcessRecurringAsync

// Job ID: #698561
using EkolPY.Integration.Manager.Tasks;

var retrieveUpdateProductBatchResultsTask = Activate<RetrieveUpdateProductBatchResultsTask>();
await retrieveUpdateProductBatchResultsTask.ProcessRecurringAsync(
    null,
    "default",
    FromJson<TaskType>("{\"Id\":56,\"SystemName\":\"RetrieveUpdateProductBatchResults\",\"Name\":\"Toplu(ürün güncelleme) işlem olan kanalların bekleyen sonuçlarını alır\",\"JobClassName\":\"RetrieveUpdateProductBatchResultsTask\",\"Type\":\"Recurring\",\"Cron\":\"*/2 * * * *\",\"AccountId\":1,\"SalesChannelOption\":1,\"AccountOption\":1,\"SalesChannelOptionEnum\":1,\"AccountOptionEnum\":1,\"CreatedOnUtc\":\"2023-05-22T15:26:29.407\",\"UpdatedOnUtc\":\"2023-05-22T15:26:29.407\",\"IsActive\":true,\"TaskTypeSalesChannel\":[{\"Id\":30,\"TaskTypeId\":56,\"SalesChannelId\":2,\"CreatedOnUtc\":\"2023-05-22T15:26:29.407\",\"UpdatedOnUtc\":\"2023-05-22T15:26:29.407\",\"IsActive\":true},{\"Id\":31,\"TaskTypeId\":56,\"SalesChannelId\":14,\"CreatedOnUtc\":\"2023-05-22T15:26:29.407\",\"UpdatedOnUtc\":\"2023-05-22T15:26:29.407\",\"IsActive\":true},{\"Id\":32,\"TaskTypeId\":56,\"SalesChannelId\":3,\"CreatedOnUtc\":\"2023-05-22T15:26:29.407\",\"UpdatedOnUtc\":\"2023-05-22T15:26:29.407\",\"IsActive\":true},{\"Id\":96,\"TaskTypeId\":56,\"SalesChannelId\":7,\"CreatedOnUtc\":\"2023-05-22T15:26:29.407\",\"UpdatedOnUtc\":\"2023-05-22T15:26:29.407\",\"IsActive\":true},{\"Id\":203,\"TaskTypeId\":56,\"SalesChannelId\":1,\"CreatedOnUtc\":\"2023-05-22T15:26:29.407\",\"UpdatedOnUtc\":\"2023-05-22T15:26:29.407\",\"IsActive\":true}]}"));

Parameters

RecurringJobId
"RetrieveUpdateProductBatchResults"
Time
1755190561
CurrentCulture
"tr-TR"
CurrentUICulture
"en-US"

State

08/14/2025 17:21:38 (+25m 35.367s) Failed

An exception occurred during performance of the job.

Microsoft.EntityFrameworkCore.DbUpdateException

An error occurred while saving the entity changes. See the inner exception for details.

Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Npgsql.PostgresException (0x80004005): 23503: insert or update on table "IntegrationTaskLog" violates foreign key constraint "FK_IntegrationTaskLog_TaskId_IntegrationTask_Id"

DETAIL: Key (TaskId)=(0) is not present in table "IntegrationTask".
   at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|215_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
   at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
   at Npgsql.EntityFrameworkCore.PostgreSQL.Update.Internal.NpgsqlModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
  Exception data:
    Severity: ERROR
    SqlState: 23503
    MessageText: insert or update on table "IntegrationTaskLog" violates foreign key constraint "FK_IntegrationTaskLog_TaskId_IntegrationTask_Id"
    Detail: Key (TaskId)=(0) is not present in table "IntegrationTask".
    SchemaName: public
    TableName: IntegrationTaskLog
    ConstraintName: FK_IntegrationTaskLog_TaskId_IntegrationTask_Id
    File: ri_triggers.c
    Line: 2619
    Routine: ri_ReportViolation
   --- End of inner exception stack trace ---
   at Npgsql.EntityFrameworkCore.PostgreSQL.Update.Internal.NpgsqlModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at EkolPY.Integration.Service.IntegrationTaskService.AddTaskLog(TaskLogLevel logLevel, String[] messages) in C:\Users\taner.er\source\repos\ekol360\Integration\EkolPY.Integration.Service\IntegrationService.cs:line 154
   at EkolPY.Integration.Service.IntegrationTaskService.AddTaskError(Exception ex, String[] msgs) in C:\Users\taner.er\source\repos\ekol360\Integration\EkolPY.Integration.Service\IntegrationService.cs:line 144
   at EkolPY.Integration.Service.IntegrationTaskService.SetFailedWithException(String message, Exception ex) in C:\Users\taner.er\source\repos\ekol360\Integration\EkolPY.Integration.Service\IntegrationService.cs:line 244
   at EkolPY.Integration.Manager.TaskBase`1.ProcessRecurringAsync(PerformContext context, String queueName, TaskType taskType) in C:\Users\taner.er\source\repos\ekol360\Integration\EkolPY.Integration.Manager\TaskBase.cs:line 162
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()

+948ms Processing

Server:
tanerer:24164
Worker:
462657a8

+389ms Enqueued

Triggered by recurring job scheduler

Queue:
default

08/14/2025 16:56:01 Created