From 9922600177a36c7538f0d0ff5615ebb8257539e5 Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Fri, 25 Sep 2015 14:06:50 +0200 Subject: [PATCH] The setup is not based on a fixed endpoint any more. Removed usage of => function. Heartbeat can now be executed on any arango without v8-harmony flags --- setup.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.js b/setup.js index d2ee5f0..a1c6ddf 100644 --- a/setup.js +++ b/setup.js @@ -3,10 +3,12 @@ const Foxx = require('org/arangodb/foxx'); const queue = Foxx.queues.create('heartbeat'); -queue.all().forEach(jobId => queue.delete(jobId)); +queue.all().forEach(function (jobId) { + queue.delete(jobId); +}); const intervalInSeconds = applicationContext.configuration.interval; queue.push( - {mount: '/heartbeat', name: 'beat'}, + {mount: applicationContext.mount, name: 'beat'}, {interval: intervalInSeconds}, {repeatTimes: -1, repeatDelay: intervalInSeconds * 1000} );