we've two Echo Nodes, which shall replicate their Data every 5 Minutes.
Both Webserver and Localserver have following timer startet on creation:
Timer := TSparkleTimer.Create(
Echo, 5000, TTimerType.Periodic);
The Webserver wont push and pull data.
The Localserver on the other hand shall push/pull Data every 5 Minutes.
So i implemented a second timer which calls the following procedures:
Every few hours the local Server Crashes and i have to restart the application.
I guess it's because these functions are asynchronous and therefore not finished when the timer triggers the replication process.
Could that be the problem?
Then i wonder if it's necessary to call
Batchload in the Pull procedure?
If you are already calling BatchLoad and Route in the timer, why are you calling it again in the Pull/Push methods?
In any case, you should guarantee that such Echo methods are not executed simultaneously. Make sure that a Route, Pull, Push or BatchLoad are not not called if any of other are not being executed.
Are there functions to check if an process has already finished?
No, you should do that control yourself.
But how can i control if
BatchLoad has finished when there is no function for that?
Or is it save to make two functions like this
and either call the one or the other? Or is it problematic to put push and pull in one procedure?
Because if there is no way to check if the pull command has finished, i don't know how to control when the push command should be called and so on.
The commands are not asynchronous. So after the line is executed, the command is finished:
// BatchLoad has finished here.