This change adds three new types to eventually replace the current implementation of the job-service NextJob logic.
This change adds two types that implement a DateIterator interface:
DailyIterator - for generating a sequence of dates for processing "yesterday".
HistoricalIterator - for generating a sequence of dates for historical processing.
This change adds a generic JobIterator that can accept either a DailyIterator or HistoricalIterator. Ultimately, the job service will include two JobIterators using one of each DateIterator.
Notable about this implementation:
Previously (currently) the NextJob logic follows a persistence cycle below. If restarted mid-processing, the next date is reloaded before all data is processed, potentially skipping some data.
load (on restart)
update, filter, save (for next job date).
The JobIterator here follows a persistence cycle below. If restarted mid-processing, the current date is reloaded potentially reprocessing some data, but none is skipped.
This change adds three new types to eventually replace the current implementation of the job-service NextJob logic.
This change adds two types that implement a
DateIterator
interface:This change adds a generic
JobIterator
that can accept either aDailyIterator
orHistoricalIterator
. Ultimately, the job service will include two JobIterators using one of eachDateIterator
.Notable about this implementation:
Part of:
Tested only with unit tests. This change adds a new interface before using it.
This change is