From 49791a836e768b71276c341ad0091fefb7aafd2a Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Wed, 22 Nov 2017 14:26:12 +0100 Subject: [PATCH] Added cluster node check --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index 1bdcfef6..a7dc8b17 100644 --- a/main.go +++ b/main.go @@ -58,6 +58,11 @@ func configure(app *aero.Application) *aero.Application { // Close the database node on shutdown app.OnShutdown(arn.Node.Close) + // Check that this is the server + if !arn.Node.IsServer() { + panic("Another program is currently running as the database server") + } + // Prefetch all collections arn.DB.Prefetch()