@chrysb/alphaclaw 0.1.6 → 0.1.7
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.
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
const { exec } = require("child_process");
|
|
2
|
-
const { spawn } = require("child_process");
|
|
3
2
|
const fs = require("fs");
|
|
4
3
|
const path = require("path");
|
|
5
4
|
const https = require("https");
|
|
@@ -132,13 +131,12 @@ const createAlphaclawVersionService = () => {
|
|
|
132
131
|
});
|
|
133
132
|
|
|
134
133
|
const restartProcess = () => {
|
|
135
|
-
console.log("[alphaclaw] Restarting process...");
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
process.exit(0);
|
|
134
|
+
console.log("[alphaclaw] Restarting process (exit 1 to trigger container restart)...");
|
|
135
|
+
// Exit with code 1 so container orchestrators (Railway, Docker restart policy)
|
|
136
|
+
// treat it as a crash and automatically restart the service.
|
|
137
|
+
// The spawned-child approach doesn't work in containers because killing PID 1
|
|
138
|
+
// tears down the entire container.
|
|
139
|
+
process.exit(1);
|
|
142
140
|
};
|
|
143
141
|
|
|
144
142
|
const getVersionStatus = async (refresh) => {
|