Re: Can we still play when autohost freezes? |
Fri, 27 July 2007 22:06 |
|
Ron | | Commander Forum Administrator Stars! AutoHost Administrator | Messages: 1231
Registered: October 2002 Location: Collegedale, TN | |
|
I'm sorry folks. That was my fault... The PRISM game crashed stars.exe under WINE again. I usually put all games on hold after SAH has been frozen for more than about 4 hours.
In this case, I forgot to run the script that actually puts all games on hold. Then I edited the text file containing the message that game hosts receive, which contains the standard phrase "all games have been put on hold...", and sent out the emails.
I suppose I could automate whether all games get put on hold or not, by having the startup script check how long SAH has been frozen when I run it.
pseudo code
if ((currenttimestamp - timestamp(autohost.log)) > 4 hours) {
run_script(allgamesonhold.pl);
edit(host_email.txt){
search/replace('HOLD','all games on hold');
}
}
else {
if (restarting SAH after freeze){
edit(host_email.txt){
search/replace('HOLD','all games have NOT been put on hold');
}
}
}
Anyway, while currently an inconvenience for game hosts, they can restore a previous turn if needed.
As for scheduling... its a mess. Considering the different factors involved, I think it doesn't work too bad. If anyone can provide pseudo code that handles scheduling (and all the different cases that can come up) better, please post it.
Ron Miller
Stars! AutoHostReport message to a moderator
|
|
|