docker: rename function

This commit is contained in:
Girish Ramakrishnan
2025-05-21 15:37:31 +02:00
parent f53180a960
commit 3770f07720
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -18,7 +18,7 @@ exports = module.exports = {
inspect,
getContainerIp,
getEvents,
memoryUsage,
stats,
update,
@@ -537,7 +537,7 @@ async function deleteContainers(appId, options) {
const labels = [ 'appId=' + appId ];
if (options.managedOnly) labels.push('isCloudronManaged=true');
const [error, containers] = await safe(gConnection.listContainers({ all: 1, filters: JSON.stringify({ label: labels }) }));
const [error, containers] = await safe(gConnection.listContainers({ all: options.all, filters: JSON.stringify({ label: labels }) }));
if (error) throw new BoxError(BoxError.DOCKER_ERROR, error);
for (const container of containers) {
@@ -660,7 +660,7 @@ async function getEvents(options) {
return stream;
}
async function memoryUsage(containerId) {
async function stats(containerId) {
assert.strictEqual(typeof containerId, 'string');
const container = gConnection.getContainer(containerId);