Merge branch 'master' into core-rest-flask

This commit is contained in:
Blake J. Harnden 2018-09-11 08:09:25 -07:00
commit 832f3e3ee5
5 changed files with 14 additions and 19 deletions

View file

@ -854,12 +854,13 @@ class CoreEmu(object):
for session in sessions.itervalues():
session.shutdown()
def create_session(self, _id=None, master=True):
def create_session(self, _id=None, master=True, _cls=EmuSession):
"""
Create a new CORE session, set to master if running standalone.
:param int _id: session id for new session
:param bool master: sets session to master
:param class _cls: EmuSession class to use
:return: created session
:rtype: EmuSession
"""
@ -871,7 +872,7 @@ class CoreEmu(object):
if session_id not in self.sessions:
break
session = EmuSession(session_id, config=self.config)
session = _cls(session_id, config=self.config)
logger.info("created session: %s", session_id)
if master:
session.master = True

View file

@ -1,13 +0,0 @@
/var/log/core-daemon.log {
rotate 7
daily
missingok
notifempty
compress
sharedscripts
postrotate
if [ -r /var/run/core-daemon.pid ]; then
kill -USR1 $(cat /var/run/core-daemon.pid) > /dev/null 2>&1
fi
endscript
}