Trying backend again
This commit is contained in:
+2
-4
@@ -125,8 +125,6 @@ namespace Swarmops.Backend
|
||||
|
||||
Console.WriteLine(" * Swarmops Backend starting");
|
||||
|
||||
HeartBeater.Instance.Beat(heartbeatFile);
|
||||
|
||||
BotLog.Write(0, "MainCycle", "Backend STARTING");
|
||||
|
||||
DateTime cycleStartTime = DateTime.Now;
|
||||
@@ -145,7 +143,6 @@ namespace Swarmops.Backend
|
||||
|
||||
try
|
||||
{
|
||||
HeartBeater.Instance.Beat();
|
||||
OnEveryTenSeconds();
|
||||
|
||||
if (cycleStartTime.Second < lastSecond)
|
||||
@@ -209,11 +206,12 @@ namespace Swarmops.Backend
|
||||
Console.WriteLine(" * Swarmops Backend stopping");
|
||||
BotLog.Write(0, "MainCycle", "BACKEND EXITING, sending backend-termination notices");
|
||||
|
||||
/*
|
||||
if (HeartBeater.Instance.WasKilled)
|
||||
{
|
||||
// removed unconditional delete, cron job that restarts bot uses it to know that it is intentionally down.
|
||||
ExceptionMail.Send(new Exception("HeartBeater triggered restart of Swarmops Backend. Will commence after 800 seconds."), false);
|
||||
}
|
||||
}*/
|
||||
|
||||
BotLog.Write(0, "MainCycle", "...done");
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="Swarmops backend daemon"
|
||||
NAME=swarmops-backend
|
||||
NAME=swarmops-back
|
||||
BINARY=Swarmops.Backend.exe
|
||||
MONO=/usr/bin/mono
|
||||
DAEMON=/opt/swarmops/backend
|
||||
DAEMON_ARGS="--options args"
|
||||
@@ -51,9 +52,9 @@ do_start()
|
||||
# 1 if daemon was already running
|
||||
# 2 if daemon could not be started
|
||||
echo "Starting Swarmops backend..."
|
||||
start-stop-daemon --start --pidfile $PIDFILE --exec $MONO --make-pidfile --chdir $DAEMON --background --test $DAEMON/$NAME > /dev/null \
|
||||
start-stop-daemon --start --pidfile $PIDFILE --exec $MONO --make-pidfile --chdir $DAEMON --name $NAME --background --test $DAEMON/$BINARY \
|
||||
|| return 1
|
||||
start-stop-daemon --start --pidfile $PIDFILE --exec $MONO --make-pidfile --chdir $DAEMON --background $DAEMON/$NAME > /dev/null \
|
||||
start-stop-daemon --start --pidfile $PIDFILE --exec $MONO --make-pidfile --chdir $DAEMON --name $NAME --background $DAEMON/$BINARY \
|
||||
|| return 2
|
||||
# Add code here, if necessary, that waits for the process to be ready
|
||||
# to handle requests from services started subsequently which depend
|
||||
|
||||
Reference in New Issue
Block a user