cloudron 8.2.0 → 8.2.2
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/actions.js +7 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/actions.js
CHANGED
|
@@ -101,7 +101,14 @@ async function stopActiveTask(app, options) {
|
|
|
101
101
|
|
|
102
102
|
const request = createRequest('POST', `/api/v1/tasks/${app.taskId}/stop`, options);
|
|
103
103
|
const response = await request.send({});
|
|
104
|
+
if (response.status === 409) return; // task already finished between getApp and now
|
|
104
105
|
if (response.status !== 204) throw `Failed to stop active task: ${requestError(response)}`;
|
|
106
|
+
|
|
107
|
+
if (!options.wait) return;
|
|
108
|
+
|
|
109
|
+
const result = await waitForTask(app.taskId, options);
|
|
110
|
+
// 'stopped' is the expected terminal state when we just asked the task to stop
|
|
111
|
+
if (result.error && result.error.code !== 'stopped') throw new Error(`Stop active task failed: ${result.error.message}`);
|
|
105
112
|
}
|
|
106
113
|
|
|
107
114
|
function saveCwdAppId(appId, manifestFilePath) {
|