fix: skip PublisherStalledCheck if PublisherOfflineCheck fails #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
we agree that
PublisherStalledCheck
should fulfil these 3 requirements:PublisherOfflineCheck
fails)PublisherOfflineCheck
returns true butdistance > self.__abandoned_slot_distance
there seems to be 2 ways we can do this:
PublisherStalledCheck
including modifying the check to acceptmax_slot_distance
andabandoned_slot_distance
fields which don't really seem to belong there since this is forPublisherOfflineCheck
PublisherStalledCheck
runs afterPublisherOfflineCheck
and keep track of the deps with flagsinstead of modifying
PublisherStalledCheck
to also acceptmax_slot_distance
andabandoned_slot_distance
solely for the purpose of replicating the offline check, I have chosen the second option in this PR which is to modifycheck_publisher()
so that we don't have to duplicate the offline check, this is definitely not without its drawback, which is that now thecheck_publisher()
function becomes more complicatedupdate: previously I've tried to approach this issue using option 2 but it turns out changes the code to be more complicated and introduce dependencies that will make it more unmaintainable so I have reverted to the first option instead