rol-websocket-channel 1.7.6 → 1.7.8
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.
|
@@ -101,6 +101,13 @@ export const pluginSelfUpdate = async (_params, context) => {
|
|
|
101
101
|
...result
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
|
+
// Trigger restart in background after a short delay (e.g. 2 seconds) to allow the MQTT response to be sent
|
|
105
|
+
setTimeout(() => {
|
|
106
|
+
console.log('[system] Triggering automatic restart after plugin update...');
|
|
107
|
+
runOpenClawCommand(['gateway', 'restart'], context, 'pluginSelfUpdate.restart').catch((error) => {
|
|
108
|
+
console.error('[system] Auto-restart after update failed:', error);
|
|
109
|
+
});
|
|
110
|
+
}, 2000);
|
|
104
111
|
return {
|
|
105
112
|
ok: true,
|
|
106
113
|
action: 'pluginSelfUpdate',
|
package/package.json
CHANGED
|
@@ -115,6 +115,14 @@ export const pluginSelfUpdate: MethodHandler = async (_params, context: MethodCo
|
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
// Trigger restart in background after a short delay (e.g. 2 seconds) to allow the MQTT response to be sent
|
|
119
|
+
setTimeout(() => {
|
|
120
|
+
console.log('[system] Triggering automatic restart after plugin update...');
|
|
121
|
+
runOpenClawCommand(['gateway', 'restart'], context, 'pluginSelfUpdate.restart').catch((error) => {
|
|
122
|
+
console.error('[system] Auto-restart after update failed:', error);
|
|
123
|
+
});
|
|
124
|
+
}, 2000);
|
|
125
|
+
|
|
118
126
|
return {
|
|
119
127
|
ok: true,
|
|
120
128
|
action: 'pluginSelfUpdate',
|