Skip to content

Commit 2c1b5ec

Browse files
authored
Merge pull request #255 from kevinbarbour/upload-all-days
feat: configuration for cutoffs on non-banking days
2 parents c382332 + 86488fc commit 2c1b5ec

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

docs/config.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ ACHGateway:
183183
Timezone: <string>
184184
Windows:
185185
- <string>
186+
[ On: <string> | default = "banking-days" ] # banking-days or all-days
186187
PreUpload:
187188
GPG: # Optional
188189
KeyFile: <string>

internal/pipeline/aggregate.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,12 @@ func (xfagg *aggregator) Start(ctx context.Context) {
128128
// process automated cutoff time triggering
129129
case day := <-xfagg.cutoffs.C:
130130
// Run our regular routines
131-
if day.IsBankingDay {
131+
if day.IsBankingDay || xfagg.shard.Cutoffs.On == "all-days" {
132132
if err := xfagg.withEachFile(day.Time); err != nil {
133133
err = xfagg.logger.Error().LogErrorf("merging files: %v", err).Err()
134134
xfagg.alertOnError(err)
135135
}
136-
}
137-
if day.IsHoliday && !day.IsWeekend {
136+
} else if day.IsHoliday && !day.IsWeekend {
138137
xfagg.notifyAboutHoliday(day)
139138
}
140139

internal/service/model_sharding.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ func (cfg Shard) Validate() error {
107107
type Cutoffs struct {
108108
Timezone string
109109
Windows []string
110+
On string
110111
}
111112

112113
func (cfg Cutoffs) Location() *time.Location {

0 commit comments

Comments
 (0)