Example #1
0
	def SvcDoRun(self):
		'''Service Run entry point'''
		# initialize your services here
		sysLogInfo("Starting {0} {1}".format(IService(application).name, __version__))
		IService(application).startService()
		reactor.run(installSignalHandlers=0)
		sysLogInfo("{0} {1} Windows service stopped".format( IService(application).name, __version__ ))
Example #2
0
 def SvcContinue(self):
     '''Service Continue entry point'''
     self.ReportServiceStatus(win32service.SERVICE_CONTINUE_PENDING)
     reactor.callFromThread(TopLevelService.sigresume)
     sysLogInfo("Resuming {0} {1} Windows service".format(
         IService(application).name, __version__))
     self.ReportServiceStatus(win32service.SERVICE_RUNNING)
Example #3
0
 def SvcPause(self):
     '''Service Pause entry point'''
     self.ReportServiceStatus(win32service.SERVICE_PAUSE_PENDING)
     reactor.callFromThread(TopLevelService.sigpause)
     sysLogInfo("Pausing {0} {1} Windows service".format(
         IService(application).name, __version__))
     self.ReportServiceStatus(win32service.SERVICE_PAUSED)
Example #4
0
 def SvcDoRun(self):
     '''Service Run entry point'''
     # initialize your services here
     sysLogInfo("Starting {0} {1}".format(
         IService(application).name, __version__))
     IService(application).startService()
     reactor.run(installSignalHandlers=0)
     sysLogInfo("{0} {1} Windows service stopped".format(
         IService(application).name, __version__))
Example #5
0
from twisted.internet import reactor
from twisted.application.service import IService

#--------------
# local imports
# -------------

from tessdb  import __version__
from tessdb.application import application
from tessdb.logger      import sysLogInfo

# ----------------
# Module constants
# ----------------

# -----------------------
# Module global variables
# -----------------------


# ------------------------
# Module Utility Functions
# ------------------------

# MAIN CODE

sysLogInfo("Starting {0} {1} Linux service".format(IService(application).name, __version__ ))
IService(application).startService()
reactor.run()
sysLogInfo("{0} {1} Linux service stopped".format(IService(application).name, __version__ ))
sys.exit(0)
Example #6
0
	def SvcContinue(self):
		'''Service Continue entry point'''
		self.ReportServiceStatus(win32service.SERVICE_CONTINUE_PENDING)
		reactor.callFromThread(TopLevelService.sigresume)
		sysLogInfo("Resuming {0} {1} Windows service".format( IService(application).name, __version__ ))
		self.ReportServiceStatus(win32service.SERVICE_RUNNING)
Example #7
0
	def SvcPause(self):
		'''Service Pause entry point'''
		self.ReportServiceStatus(win32service.SERVICE_PAUSE_PENDING)
		reactor.callFromThread(TopLevelService.sigpause)
		sysLogInfo("Pausing {0} {1} Windows service".format( IService(application).name, __version__ ))
		self.ReportServiceStatus(win32service.SERVICE_PAUSED)
Example #8
0
	def SvcStop(self):
		'''Service Stop entry point'''
		self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
		reactor.callFromThread(reactor.stop)
		sysLogInfo("Stopping {0} {1} Windows service".format( IService(application).name, __version__ ))
Example #9
0
	def SvcDoReload(self):
		sysLogInfo("Reloading {0} {1} Windows service".format( IService(application).name, __version__ ))
		reactor.callFromThread(TopLevelService.sigreload)
Example #10
0
# ---------------

from twisted.internet import reactor
from twisted.application.service import IService

#--------------
# local imports
# -------------

from tessdb  import __version__
from tessdb.application import application
from tessdb.logger      import sysLogInfo

# ----------------
# Module constants
# ----------------

# -----------------------
# Module global variables
# -----------------------


# ------------------------
# Module Utility Functions
# ------------------------

sysLogInfo("Starting {0} {1} Linux service".format(IService(application).name, __version__ ))
IService(application).startService()
reactor.run()
sysLogInfo("{0} {1} Linux service stopped".format(IService(application).name, __version__ ))
Example #11
0
 def SvcStop(self):
     '''Service Stop entry point'''
     self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
     reactor.callFromThread(reactor.stop)
     sysLogInfo("Stopping {0} {1} Windows service".format(
         IService(application).name, __version__))
Example #12
0
 def SvcDoReload(self):
     sysLogInfo("Reloading {0} {1} Windows service".format(
         IService(application).name, __version__))
     reactor.callFromThread(TopLevelService.sigreload)