-
Notifications
You must be signed in to change notification settings - Fork 1
Add option to specify interval for transfer jobs #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with one non-blocking question about what sync.go is supposed to do.
Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status:complete! 1 of 1 approvals obtained (waiting on @cristinaleonr)
internal/stctl/sync.go
line 112 at r1 (raw file):
if c.Interval != "" && job.Schedule.RepeatInterval != c.Interval { logx.Debug.Println("spec: interval not equal", job.Schedule.RepeatInterval, c.Interval) return false
This emits an error log message and returns false when the configured job RepeatInterval
differs from the c.Interval
. For background what is sync.go supposed to do? In my mind "sync" should take the current configuration and make sure that the stored job matches. Instead, it looks like sync.go sees there is a difference, disabled the job and moves on. I assume this is the expected, desired behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 1 of 1 approvals obtained (waiting on @nkinkade)
internal/stctl/sync.go
line 112 at r1 (raw file):
Previously, nkinkade wrote…
This emits an error log message and returns false when the configured job
RepeatInterval
differs from thec.Interval
. For background what is sync.go supposed to do? In my mind "sync" should take the current configuration and make sure that the stored job matches. Instead, it looks like sync.go sees there is a difference, disabled the job and moves on. I assume this is the expected, desired behavior?
Sync checks if the current configuration matches the stored job. If so, then it's a no-op (nothing to update). If they differ, it disables the stored job and creates a new one with the current configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 1 of 1 approvals obtained (waiting on @cristinaleonr)
internal/stctl/sync.go
line 112 at r1 (raw file):
Previously, cristinaleonr (Cristina Leon) wrote…
Sync checks if the current configuration matches the stored job. If so, then it's a no-op (nothing to update). If they differ, it disables the stored job and creates a new one with the current configuration.
Ah, I missed that it actually creates a new job with the new specs. Thanks.
This PR adds an option to specify a repeat interval for transfer jobs.
It replaces previous 1 hour intervals previously set through the Transfer Job UI and it adds 1 hour transfers for revtr data.
This change is