Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Bump flytestdlib
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw committed Sep 15, 2023
1 parent ac38261 commit a417872
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions go/tasks/plugins/array/awsbatch/jobs_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ type Job struct {
SubJobs []*Job `json:"array,omitempty"`
}

func (j Job) IsTerminal() bool {
return j.Status.Phase.IsTerminal()
}

type Attempt struct {
LogStream string `json:"logStream,omitempty"`
StartedAt time.Time `json:"startedAt,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions go/tasks/plugins/hive/execution_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ const (
PhaseQueryFailed
)

func (p ExecutionPhase) IsTerminal() bool {
return p == PhaseQuerySucceeded || p == PhaseQueryFailed
}

func (p ExecutionPhase) String() string {
switch p {
case PhaseNotStarted:
Expand Down
4 changes: 4 additions & 0 deletions go/tasks/plugins/hive/executions_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ func (e ExecutionStateCacheItem) ID() string {
return e.Identifier
}

func (e ExecutionStateCacheItem) IsTerminal() bool {
return e.ExecutionState.Phase.IsTerminal()
}

// This basically grab an updated status from the Qubole API and store it in the cache
// All other handling should be in the synchronous loop.
func (q *QuboleHiveExecutionsCache) SyncQuboleQuery(ctx context.Context, batch cache.Batch) (
Expand Down

0 comments on commit a417872

Please sign in to comment.