fix(containers): remove hardcoded container stop/restart timeout
REST call to stop/restart a container overrides the default stop timeout (before kill) with hardcoded 5 seconds. Containers already have a default stop timeout handled by the engine API (https://github.com/moby/moby/blob/master/client/container_stop.go). With this hardcoded 5 seconds, the containers get killed after 5 seconds even if they define a custom greater stop timeout. Another solution would be to not hardcode the 5 seconds but rather use a global editable setting.pull/1978/head
parent
1e12057cdd
commit
b349f16090
|
@ -15,10 +15,10 @@ function ContainerFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
|
|||
method: 'GET', params: { action: 'json' }
|
||||
},
|
||||
stop: {
|
||||
method: 'POST', params: { id: '@id', t: 5, action: 'stop' }
|
||||
method: 'POST', params: { id: '@id', action: 'stop' }
|
||||
},
|
||||
restart: {
|
||||
method: 'POST', params: { id: '@id', t: 5, action: 'restart' }
|
||||
method: 'POST', params: { id: '@id', action: 'restart' }
|
||||
},
|
||||
kill: {
|
||||
method: 'POST', params: { id: '@id', action: 'kill' }
|
||||
|
|
Loading…
Reference in New Issue