added LSL2 stored procedures
This commit is contained in:
49
LSL2/STPROC/OENGINE_HEARTBEAT.txt
Normal file
49
LSL2/STPROC/OENGINE_HEARTBEAT.txt
Normal file
@ -0,0 +1,49 @@
|
||||
Compile function OENGINE_HEARTBEAT(@Service, @Params)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
declare function GetCommandLine
|
||||
Declare function Database_Services, SRP_TcpClient, Environment_Services
|
||||
Declare subroutine SRP_TcpClient
|
||||
|
||||
|
||||
$Insert LOGICAL
|
||||
$insert SERVICE_SETUP
|
||||
|
||||
|
||||
|
||||
|
||||
GoToService else
|
||||
null
|
||||
end
|
||||
|
||||
Return Response else ''
|
||||
|
||||
Service Run()
|
||||
|
||||
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
|
||||
Lock hSysLists, ServiceKeyID then
|
||||
CommandLine = GetCommandLine()
|
||||
Server = Environment_Services('GetServer')
|
||||
Env = ''
|
||||
Begin Case
|
||||
Case Server EQ 'MESTSA01EC' OR Server EQ 'MESSA01EC'
|
||||
Env = 'DB'
|
||||
Case Server EQ 'MESSA005' OR Server EQ 'MESSA012'
|
||||
Env = 'APP'
|
||||
End Case
|
||||
//test = Indexc(CommandLine, '/S=EN', 1)
|
||||
|
||||
IF Indexc(CommandLine, '/S=EN', 1) then
|
||||
EngineTag = Indexc(CommandLine, '/S=EN', 1) + 3
|
||||
EngineNo = CommandLine[EngineTag, 999]
|
||||
|
||||
If SRP_TcpClient(TcpClientHandle, "CONNECT", "127.0.0.1", "13000") then
|
||||
SRP_TcpClient(TcpClientHandle, "SEND", Env:'-':EngineNo)
|
||||
SRP_TcpClient(TcpClientHandle, "CLOSE")
|
||||
end
|
||||
|
||||
end
|
||||
ClearSelect 0
|
||||
end
|
||||
Unlock hSysLists, ServiceKeyID else Null
|
||||
|
||||
end service
|
Reference in New Issue
Block a user