|
@@ -2,6 +2,7 @@ const config = require("fourier-common").config;
|
|
const db = require("fourier-common").fbconn.database();
|
|
const db = require("fourier-common").fbconn.database();
|
|
const spawn = require("child_process").spawn;
|
|
const spawn = require("child_process").spawn;
|
|
const path = require("path");
|
|
const path = require("path");
|
|
|
|
+const express = require('express');
|
|
|
|
|
|
var working = false;
|
|
var working = false;
|
|
|
|
|
|
@@ -94,6 +95,15 @@ function start() {
|
|
//});
|
|
//});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+endpoint.get('/info', function(request, response) {
|
|
|
|
+ response.send(JSON.stringify({
|
|
|
|
+ 'version': version,
|
|
|
|
+ 'processID': process.id,
|
|
|
|
+ 'memoryUsage': process.memoryUsage().rss
|
|
|
|
+ }));
|
|
|
|
+});
|
|
|
|
+endpoint.listen(49223);
|
|
|
|
+
|
|
function stop() {
|
|
function stop() {
|
|
od_ref.off();
|
|
od_ref.off();
|
|
queue = {};
|
|
queue = {};
|