replace with custom superagent based on fetch API
This commit is contained in:
+2
-2
@@ -68,7 +68,7 @@ const addonConfigs = require('./addonconfigs.js'),
|
||||
settings = require('./settings.js'),
|
||||
sftp = require('./sftp.js'),
|
||||
shell = require('./shell.js')('services'),
|
||||
superagent = require('superagent');
|
||||
superagent = require('./superagent.js');
|
||||
|
||||
const NOOP = async function (/*app, options*/) {};
|
||||
const RMADDONDIR_CMD = path.join(__dirname, 'scripts/rmaddondir.sh');
|
||||
@@ -334,7 +334,7 @@ async function containerStatus(containerName, tokenEnvName) {
|
||||
.ok(() => true));
|
||||
|
||||
if (networkError) return { status: exports.SERVICE_STATUS_STARTING, error: `Error waiting for ${containerName}: ${networkError.message}` };
|
||||
if (response.status !== 200 || !response.body.status) return { status: exports.SERVICE_STATUS_STARTING, error: `Error waiting for ${containerName}. Status code: ${response.statusCode} message: ${response.body.message}` };
|
||||
if (response.status !== 200 || !response.body.status) return { status: exports.SERVICE_STATUS_STARTING, error: `Error waiting for ${containerName}. Status code: ${response.status} message: ${response.body.message}` };
|
||||
|
||||
const result = await docker.memoryUsage(containerName);
|
||||
const stats = result.memory_stats || { usage: 0, limit: 1 };
|
||||
|
||||
Reference in New Issue
Block a user