Skip to content

MVP for dedicated Workers project - #871

Merged
jvyden merged 12 commits into
LittleBigRefresh:mainfrom
jvyden:worker-refactor
Jul 21, 2025
Merged

MVP for dedicated Workers project#871
jvyden merged 12 commits into
LittleBigRefresh:mainfrom
jvyden:worker-refactor

Conversation

@jvyden

@jvyden jvyden commented Jul 21, 2025

Copy link
Copy Markdown
Member

Partially addresses #786.

This has a number of changes that will be required for making Refresh more scalable, as well as generalizing the implementation to support jobs that have unique lifetimes (e.g. those who do not need to repeat constantly, or run every tick, or only once on startup).

  • IWorker is now WorkerJob. Henceforth "Worker" will refer to the process running these "Job"s.
  • The base classes required for workers to function have been separated to their own project.
    • WorkerJob is now in Refresh.Workers
    • Jobs like ExpiringObjectJob stay in the interface project.
  • Jobs have been refactored to be able to specify their own conditions for being able to run. For example, we now have RepeatingJob which is the old behavior. I've introduced StartupJob as well, or you can use the default WorkerJob which runs every tick by default.
  • Information and metadata regarding Worker status is now in the database. This stores when the worker was brought up, when the last cycle was run, and it's class. The class specifies which codebase the worker belongs to (e.g. we will have a worker implementation for both Refresh and Toolkit) - and only one worker of a class can exist at a given time, new ones that start up will cause the other worker to shut down.
  • A very very barebones executable Refresh.WorkerManager project was introduced. This simply runs a WorkerManager, but lacks any ability to configure it. I will complete this in a follow-up PR.

@jvyden
jvyden marked this pull request as ready for review July 21, 2025 23:09
@jvyden
jvyden merged commit e10f859 into LittleBigRefresh:main Jul 21, 2025
@jvyden
jvyden deleted the worker-refactor branch July 21, 2025 23:13
@jvyden jvyden added this to the Import dry archive milestone Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant