@platformatic/watt-extra 1.11.0-alpha.2 → 1.11.0-alpha.3
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/package.json +1 -1
- package/plugins/health-signals.js +3 -0
- package/plugins/update.js +1 -0
package/package.json
CHANGED
|
@@ -99,6 +99,7 @@ async function healthSignals (app, _opts) {
|
|
|
99
99
|
|
|
100
100
|
let batchHasHighValue = false
|
|
101
101
|
let batchStartedAt = null
|
|
102
|
+
|
|
102
103
|
setInterval(() => {
|
|
103
104
|
const now = Date.now()
|
|
104
105
|
const batchTimeout = batchHasHighValue
|
|
@@ -199,6 +200,8 @@ async function healthSignals (app, _opts) {
|
|
|
199
200
|
|
|
200
201
|
const runtimeId = app.getRuntimeId()
|
|
201
202
|
|
|
203
|
+
process._rawDebug(`[health-signals] Sending signals to scaler: runtimeId=${runtimeId} applicationId=${applicationId} timestamp=${Date.now()} signals=${JSON.stringify(signals)}`)
|
|
204
|
+
|
|
202
205
|
const { statusCode, body } = await request(`${scalerUrl}/signals`, {
|
|
203
206
|
method: 'POST',
|
|
204
207
|
headers: {
|
package/plugins/update.js
CHANGED
|
@@ -77,6 +77,7 @@ async function updatePlugin (app) {
|
|
|
77
77
|
socket = new WebSocket(wsUrl, { headers })
|
|
78
78
|
await once(socket, 'open')
|
|
79
79
|
|
|
80
|
+
process._rawDebug(`[update] WebSocket connected: runtimeId=${runtimeId} applicationId=${applicationId} timestamp=${Date.now()}`)
|
|
80
81
|
app.log.info('Connected to updates websocket')
|
|
81
82
|
// Subscribing, if subscription fails we throw, so the caller can retry
|
|
82
83
|
const subscribeMsg = JSON.stringify({ command: 'subscribe', topic: '/config' })
|