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