fix(task/executor): Use correct name for last success time extern (#19435)
* fix(task/executor): Use correct name for last success time extern. * chore(tasks/executor): Don't reuse this constant in the tests. Test the name.pull/19432/head
parent
1ae2541bf3
commit
fde2129002
|
@ -25,8 +25,7 @@ const (
|
|||
maxPromises = 1000
|
||||
defaultMaxWorkers = 100
|
||||
|
||||
latestSuccessOption = "tasks.latestSuccessTime"
|
||||
latestFailureOption = "tasks.latestFailureTime"
|
||||
lastSuccessOption = "tasks.lastSuccessTime"
|
||||
)
|
||||
|
||||
var _ scheduler.Executor = (*Executor)(nil)
|
||||
|
@ -90,7 +89,7 @@ func (ts CompilerBuilderTimestamps) Extern() *ast.File {
|
|||
if !ts.LatestSuccess.IsZero() {
|
||||
body = append(body, &ast.OptionStatement{
|
||||
Assignment: &ast.VariableAssignment{
|
||||
ID: &ast.Identifier{Name: latestSuccessOption},
|
||||
ID: &ast.Identifier{Name: lastSuccessOption},
|
||||
Init: &ast.DateTimeLiteral{
|
||||
Value: ts.LatestSuccess,
|
||||
},
|
||||
|
|
|
@ -189,7 +189,7 @@ func TestTaskExecutor_QuerySuccessWithExternInjection(t *testing.T) {
|
|||
extern := &ast.File{
|
||||
Body: []ast.Statement{&ast.OptionStatement{
|
||||
Assignment: &ast.VariableAssignment{
|
||||
ID: &ast.Identifier{Name: latestSuccessOption},
|
||||
ID: &ast.Identifier{Name: "tasks.lastSuccessTime"},
|
||||
Init: &ast.DateTimeLiteral{
|
||||
Value: latestSuccess,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue