Brad,
WOW!
This is EXACTLY my scenario as well! I added a stored procedure to check a folder for files.
Could you share your "web server has started" code?
`Project Method: A4D_PauseUntilWebServerOK
`
`Checks that all processes associated with the ITK-based web server have launched
`and are in an acceptable state. `Returns TRUE if all processes launched OK or launch attempt didn't timeout.
`This method was written to pause future startup processing, specifically other `processes that might interfere with web server process startup.
`
`This method would typically be called at the end of or immediately after the method
`A4D_INIT. Example:
`
` A4D_INIT
` If (Not(A4D_PauseUntilWebServerOK))
` `Handle web server startup error
` End if
` A4D_DebugInit
`
`Note: The method is an add on to the A4D ITK Shell
`
`
`___History______________________________________________________________________
`
`02-Mar-2005, bdp, created.
`
`___Parameters___________________________________________________________________
C_BOOLEAN($0;$webServerOK) $webServerOK:=False
`___Method_______________________________________________________________________
C_BOOLEAN($masterOK;$closerOK;$slavesOK;$noTimeout) C_TIME($startTime;$timeout) C_LONGINT($numSlaves)
$masterOK:=False $closerOK:=False $slavesOK:=False $noTimeout:=True $startTime:=Current time $timeout:=?00:00:30? `we'll give this test 30 seconds to run
`!!! IMPORTANT
`!!! Criteria for setting $numSlaves should match same assignment in `!!! the method "A4D_ITK_Master".
$numSlaves:=Num(A4D_GetParam ("A4D_ITKConfig";"NumSlaves";"7"))
While (Not($webServerOK))
C_LONGINT($processIndx;$processNum;$processState;$processTime)
C_STRING(255;$processName)
C_LONGINT($countSlaves)
`Has http_closer process started?
$closerOK:=(Process state(Process number("http_closer"))>=0)
`Are desired number of http_slave processes started?
$countSlaves:=0
For ($processIndx;1;Count tasks)
PROCESS PROPERTIES($processIndx;$processName;$processState;$processTime)
If ($processName="http_Slave") & ($processState>=0)
$countSlaves:=$countSlaves+1
End if IDLE
End for $slavesOK:=($countSlaves=$numSlaves)
`Has http_master process started?
$masterOK:=(Process state(Process number("http_master"))>=0)
`Are we good?
$webServerOK:=($masterOK & $closerOK & $slavesOK)
`Have we timed out?
If ((Current time-$startTime)>$timeout)
$noTimeout:=False
$webServerOK:=True `we need to exit this loop
End if IDLE
End while `(Not($allServerProcessesOK))
`___Return_______________________________________________________________________
$0:=($webServerOK & $noTimeout)
_______________________________________________ Active4D-dev mailing list [email protected] http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
