@rip-lang/server 0.6.0 → 0.6.1
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/server.rip +9 -0
package/package.json
CHANGED
package/server.rip
CHANGED
|
@@ -557,6 +557,15 @@ class Manager
|
|
|
557
557
|
|
|
558
558
|
Promise.all!(pairs.map(({ old }) -> old.process.exited.catch(-> null)))
|
|
559
559
|
|
|
560
|
+
# Notify server to remove old workers' socket entries
|
|
561
|
+
ctl = getControlSocketPath(@flags.socketPrefix)
|
|
562
|
+
for { old } in pairs
|
|
563
|
+
try
|
|
564
|
+
body = JSON.stringify({ op: 'quit', workerId: old.id })
|
|
565
|
+
fetch!('http://localhost/worker', { method: 'POST', body, headers: { 'content-type': 'application/json' }, unix: ctl }).catch(-> null)
|
|
566
|
+
catch
|
|
567
|
+
null
|
|
568
|
+
|
|
560
569
|
retiring = new Set(pairs.map((p) -> p.old.id))
|
|
561
570
|
@workers = @workers.filter((w) -> not retiring.has(w.id))
|
|
562
571
|
@retiringIds.delete(id) for id from retiring
|