コード例 #1
0
ファイル: main_winserv.py プロジェクト: astrorafael/tessdb
	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__ ))
コード例 #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)
コード例 #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)
コード例 #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__))
コード例 #5
0
ファイル: main_posix.py プロジェクト: STARS4ALL/tessdb-server
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)
コード例 #6
0
ファイル: main_winserv.py プロジェクト: astrorafael/tessdb
	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)
コード例 #7
0
ファイル: main_winserv.py プロジェクト: astrorafael/tessdb
	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)
コード例 #8
0
ファイル: main_winserv.py プロジェクト: astrorafael/tessdb
	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__ ))
コード例 #9
0
ファイル: main_winserv.py プロジェクト: astrorafael/tessdb
	def SvcDoReload(self):
		sysLogInfo("Reloading {0} {1} Windows service".format( IService(application).name, __version__ ))
		reactor.callFromThread(TopLevelService.sigreload)
コード例 #10
0
ファイル: main_posix.py プロジェクト: astrorafael/tessdb
# ---------------

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__ ))
コード例 #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__))
コード例 #12
0
 def SvcDoReload(self):
     sysLogInfo("Reloading {0} {1} Windows service".format(
         IService(application).name, __version__))
     reactor.callFromThread(TopLevelService.sigreload)