Commit Graph

2 Commits

Author SHA1 Message Date
Laura Neto
447cb881bd Audit service rework (#19346)
* Introduce new AuditEntryService

- Moved logic related to the IAuditEntryRepository from the AuditService to the new service
- Introduced new Async methods
  - Using ids (for easier transition from the previous Write method)
  - Using keys
- Moved and updated integration tests related to the audit entries to a new test class `AuditEntryServiceTests`
- Added unit tests class `AuditEntryServiceTests` and added a few unit tests
- Added migration to add columns for `performingUserKey` and `affectedUserKey` and convert existing user ids
- Adjusted usages of the old AuditService.Write method to use the new one (mostly notification handlers)

* Audit service rework

- Added new async and paged methods
- Marked (now) redundant methods as obsolete
- Updated all of the usages to use the non-obsolete methods
- Added unit tests class `AuditServiceTests` and some unit tests
- Updated existing integration test

* Apply suggestions from code review

* Small improvement

* Update src/Umbraco.Core/Services/AuditService.cs

* Some minor adjustments following the merge

* Delete unnecessary file

* Small cleanup on the tests
2025-07-01 09:12:37 +02:00
Andrew McKaskill
04ac1542aa Refactor hostedServices into background jobs (#14291)
* Refactor jobs from HostedServices into BackgroundJobs

* Clean up generics and DI setup

* Add RecurringBackgroundJob Unit Tests

* Add ServiceCollection helper

* Add Obsolete attributes

* Add Notification Classes

* Add UnitTests for RecurringBackgroundJob HostedService

* Add NotificationEvents

* Add state to notifications

* Update UnitTests

* Add Obsolete Attributes to old hosted service classes

* Updated xmldoc in IRecurringBackgroundJob.cs

* Update Obsolete attribute messages to indicate classes will be removed in Umbraco 14

(cherry picked from commit c30ffa9ac3)
2023-11-13 11:10:58 +01:00