Arlolra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/237483

Change subject: Log the signal, if available
......................................................................

Log the signal, if available

 * `code` will be `null` if the worker was killed.
   https://nodejs.org/download/docs/v0.10.40/api/cluster.html#cluster_event_exit

 * From logstash, "worker 24934 died (null), restarting."

Change-Id: Ieb04a63aadad51160148068ee449b9d6d40fee07
---
M api/server.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/83/237483/1

diff --git a/api/server.js b/api/server.js
index ee54879..245c502 100755
--- a/api/server.js
+++ b/api/server.js
@@ -152,7 +152,7 @@
        cluster.on('exit', function(worker, code, signal) {
                if (!worker.suicide) {
                        var pid = worker.process.pid;
-                       logger.log("warning", util.format("worker %s died (%s), 
restarting.", pid, code));
+                       logger.log("warning", util.format("worker %s died (%s), 
restarting.", pid, signal || code));
                        spawn();
                }
        });

-- 
To view, visit https://gerrit.wikimedia.org/r/237483
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb04a63aadad51160148068ee449b9d6d40fee07
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <abrea...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to