server-control-s3 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server_control.js +4 -1
- package/package.json +2 -2
package/dist/server_control.js
CHANGED
|
@@ -160,6 +160,7 @@ var index = {
|
|
|
160
160
|
};
|
|
161
161
|
const MAX_WAIT_COUNT = 12;
|
|
162
162
|
const SERVER_WAIT_MS = 10 * 1000;
|
|
163
|
+
const SERVER_UPDATE_TIMEOUT = 2 * 60 * 1000;
|
|
163
164
|
const DEFAULT_CONFIG = {
|
|
164
165
|
secret: 'secret',
|
|
165
166
|
routePrefix: '',
|
|
@@ -510,7 +511,8 @@ function _updateGroup(req, res) {
|
|
|
510
511
|
(done) => {
|
|
511
512
|
let group_err;
|
|
512
513
|
asyncEach(group_data.instance_list, (instance, done) => {
|
|
513
|
-
if (instance.InstanceId === group_data.InstanceId
|
|
514
|
+
if (instance.InstanceId === group_data.InstanceId ||
|
|
515
|
+
instance.State?.Name !== 'running') {
|
|
514
516
|
done();
|
|
515
517
|
}
|
|
516
518
|
else {
|
|
@@ -564,6 +566,7 @@ function _updateInstance(hash, instance, done) {
|
|
|
564
566
|
url,
|
|
565
567
|
method: 'GET',
|
|
566
568
|
headers: { 'x-sc-secret': g_config.secret },
|
|
569
|
+
timeout: SERVER_UPDATE_TIMEOUT,
|
|
567
570
|
json: { hash, secret: g_config.secret },
|
|
568
571
|
};
|
|
569
572
|
webRequest(opts, done);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "server-control-s3",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Jim Lake"
|
|
6
6
|
},
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
|
-
"url": "git@github.com
|
|
17
|
+
"url": "git+ssh://git@github.com/jim-lake/server-control-s3.git"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"dist/*",
|