mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-20 17:52:51 +00:00
Increase delta request timeout to 15 minutes
This commit is contained in:
parent
22a69cc9af
commit
7039b23ad9
@ -1,3 +1,5 @@
|
||||
* Increase delta request timeout to 15 minutes [Pablo]
|
||||
|
||||
# v1.8.0
|
||||
|
||||
* Add endpoints to start, stop and get app [Pablo, Kostas]
|
||||
|
@ -59,6 +59,7 @@ findSimilarImage = (repoTag) ->
|
||||
return 'resin/scratch'
|
||||
|
||||
DELTA_OUT_OF_SYNC_CODES = [23, 24]
|
||||
DELTA_REQUEST_TIMEOUT = 15 * 60 * 1000
|
||||
|
||||
exports.rsyncImageWithProgress = (imgDest, onProgress, startFromEmpty = false) ->
|
||||
Promise.try ->
|
||||
@ -67,7 +68,7 @@ exports.rsyncImageWithProgress = (imgDest, onProgress, startFromEmpty = false) -
|
||||
findSimilarImage(imgDest)
|
||||
.then (imgSrc) ->
|
||||
rsyncDiff = new Promise (resolve, reject) ->
|
||||
progress request.get("#{config.deltaHost}/api/v1/delta?src=#{imgSrc}&dest=#{imgDest}", timeout: 5 * 60 * 1000)
|
||||
progress request.get("#{config.deltaHost}/api/v1/delta?src=#{imgSrc}&dest=#{imgDest}", timeout: DELTA_REQUEST_TIMEOUT)
|
||||
.on 'progress', (progress) ->
|
||||
onProgress(percentage: progress.percent)
|
||||
.on 'end', ->
|
||||
|
Loading…
x
Reference in New Issue
Block a user