Commit Graph

3 Commits

Author SHA1 Message Date
Nikolaj Geisle
20de48a496 Load Balancing: Implement distributed background jobs (#20397)
* Start work

* Introduce dto

* Start making repository

* Add migrations

* Implement fetchable first job

* Fix up to also finish tasks

* Refactor jobs to distributed background jobs

* Filter jobs correctly on LastRun

* Hardcode delay

* Add settings to configure delay and period

* Fix formatting

* Add default data

* Add update on startup, which will update periods on startup

* Refactor service to return job directly

* Update src/Umbraco.Infrastructure/Services/Implement/DistributedJobService.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Infrastructure/BackgroundJobs/DistributedBackgroundJobHostedService.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Infrastructure/BackgroundJobs/DistributedBackgroundJobHostedService.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove unused

* Move jobs and make internal

* make OpenIddictCleanupJob.cs public, as it is used elsewhere

* Minor docstring changes

* Update src/Umbraco.Core/Persistence/Constants-Locks.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* ´Throw correct exceptions

* Update xml doc

* Remove business logic from repository

* Remove more business logic from repository into service

* Remove adding jobs from migration

* fix creation

* Rename to ExecuteAsync

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-10-07 18:49:21 +02:00
Bjarke Berg
608f2e3c76 Scheduled publishing in Management API (#15680)
* Only use datetimeoffset in API

* Updated publish endpoint to take schedule information

* Fixed test builds

* OpenApi updates

* Update OpenApi schema

* Fixed issues with publishing.

* Added validation before publishing. Had to move a lot of classes to core.

* added missing files

* Added validation info to error

* Typo

* Clean up and adding missing result

* Updating to AvailableCultures instead of PublishedCultures

* Handle time needs to be in the future

* validate only cultures that needs to be published

* Fix typos

* Filter out cultures that we are not trying to publish from the validation errors

* Don't filter out only the available cultures, to accommodate non-created variants

* Only allow publish of existing cultures

* Fixed issues found in test

* fixed build

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2024-02-21 09:10:48 +01: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