Open Closed

Background worker- broken audit logs #1736


User avatar
1
beuko created
  • ABP Framework version: v4.3.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

Hello.

I have problems with my background worker and audit logs.

I created background worker (AsyncPeriodicBackgroundWorkerBase) as written here https://docs.abp.io/en/abp/latest/Background-Workers

All my logic for worker is in .Application (so I can get data from other repositories too) and registration of worker is in .Domain. So what my worker is doing:

  • Get all users
  • Check few conditions
  • If all conditions are true, send email to user

The problem I have is that my background worker add empty log to database and then my Audit Log page on Angular is not showing any record.

AbpAuditLogs record:

77D52432-2114-0BB5-301C-39FE27C35A76 NULL NULL NULL NULL NULL NULL NULL 2021-08-05 11:13:05.3309880 5181 NULL NULL NULL 57b7b5ca3bb7408cab6e6525112e1cd9 NULL NULL NULL NULL {} e5867ffa4103491fa16d61e226d75790

AbpAuditLogActions record:

0B1276A4-5EE4-C8E9-29C1-39FE27C35A78 NULL 77D52432-2114-0BB5-301C-39FE27C35A76 MyProject.ImportDatas.ImportDataAppService SentEmailToUsersAsync {} 2021-08-05 11:13:05.3310275 5180 {}

Audit Log page:

Console errors:


1 Answer(s)
  • User Avatar
    0
    bunyamin created

    Hello,

    Since your worker added an empty log to the database, the row containing null values breaks the client code. We've fixed those places and merged them into the codebase. Please wait for the patch release.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35