- force GC in TransferLegacyJdOrder and TransferLegacyElmOrder
This commit is contained in:
@@ -2,6 +2,7 @@ package initdata
|
||||
|
||||
import (
|
||||
"math"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/jdapi"
|
||||
@@ -63,6 +64,7 @@ func TransferLegacyJdOrder(ctx *jxcontext.Context, isAsync, isContinueWhenError
|
||||
}, jdOrderList)
|
||||
rootTask.AddChild(task).Run()
|
||||
_, err = task.GetResult(0)
|
||||
runtime.GC()
|
||||
} else {
|
||||
rootTask.Cancel()
|
||||
}
|
||||
@@ -117,6 +119,7 @@ func TransferLegacyElmOrder(ctx *jxcontext.Context, isAsync, isContinueWhenError
|
||||
}, elmOrderList)
|
||||
rootTask.AddChild(task).Run()
|
||||
_, err = task.GetResult(0)
|
||||
runtime.GC()
|
||||
} else {
|
||||
rootTask.Cancel()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user