Skip to content

WorkerLoop RHP3 Cooldown

Peter-Jan Brone requested to merge worker-loop-cooldown into master

MERGE REQUEST

MR Guidelines

Overview

This MR refactors the various cooldown mechanisms in the worker loop. It ensures all RHP3 related subsystems use the same cooldown. For lack of a better term, I've introduced RHP3Cooldown on the worker. I'm holding off on adding docs and integrating it properly in siac until after the first review pass.

Most importantly, the following functions are now covered under a single cooldown:

managedNeedsToSyncAccountToHost/externSyncAccountBalanceToHost
staticNeedsPriceTableUpdate/staticUpdatePriceTable
managedAccountNeedsRefill/managedRefillAccount

I have purposefully left out staticSuspectRevisionMismatch/externTryFixRevisionMismatch as I believe this should not be under the RHP3 cooldown. Quite on the contrary actually, because this mechanism resolves an error that puts the RHP3 subsystem on cooldown in the first place. Putting this on cooldown would basically waste time...

All of the "checking functions" now follow the same pattern managedNeedsTo[ACTION], and their implementations are very similar now as well.

I have added a test that ensures the worker is put on cooldown, then performs an RHP2 download job. It then goes further to check whether or not the worker comes off of the cooldown and is then able to process an RHP3 download job for the same sector.

Example for Visual Changes

N/A

Checklist

Review and complete the checklist to ensure that the MR is complete before assigned to an approver.

  • All new methods or updated methods have clear docstrings
  • Testing added or updated for new methods
  • Any new packages are added to Makefile and .gitlab-ci.yml
  • API documentation updated for API updates
  • Module README.md updated for changes to workflow
  • Issue added to Sia-UI repo for new supporting features
  • Changelog File Created

Issues Closed

N/A

Edited by Peter-Jan Brone

Merge request reports