Skip to content

Commit 1b15f45

Browse files
committed
fix(odps/instance.go): Avoid reloading the synchronous job
This commit adds a sync check to the 'WaitForSuccess' method that returns success directly when the instance is in sync mode
1 parent 96cec18 commit 1b15f45

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

odps/instance.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,9 @@ func (instance *Instance) TaskResults() []TaskResult {
344344
}
345345

346346
func (instance *Instance) WaitForSuccess() error {
347+
if instance.isSync {
348+
return nil
349+
}
347350
for {
348351
err := instance.Load()
349352
if err != nil {

0 commit comments

Comments
 (0)