cloudron 8.2.1 → 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 +3 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/actions.js
CHANGED
|
@@ -101,12 +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)}`;
|
|
105
106
|
|
|
106
107
|
if (!options.wait) return;
|
|
107
108
|
|
|
108
109
|
const result = await waitForTask(app.taskId, options);
|
|
109
|
-
|
|
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}`);
|
|
110
112
|
}
|
|
111
113
|
|
|
112
114
|
function saveCwdAppId(appId, manifestFilePath) {
|