Save System on MYSQL threaded with cache function - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Save System on MYSQL threaded with cache function (
/showthread.php?tid=418176)
Save System on MYSQL threaded with cache function -
misticini - 23.02.2013
Hello,
Im working on a scratch gamemode and i make all gamemode under mysql threaded R8 system with cache functions by blueg.
I made a command called "ggmx" that save all server data and request a gmx sendrconcommand. I developed a system that guarantee that all threads ended before the gmx command is called. I have global variable incremented in every save function callback and when all threads finish call sendrconcommand.
My gamemode takes about 4 minutes to save all data.
1 question : Exist any way to turn this save system faster?
2 question : If a restart its requested with /rcon gmx i dont know why but my system dont work and server dont wait by all threads and restart without all data saved..
Regards
Re: Save System on MYSQL threaded with cache function -
Scenario - 23.02.2013
You have to post some code if you want us to help identify the issue...
To answer your questions...
1) You need to show some code for your restart command and save functions.
2) When you execute the /rcon gmx command, it tells the server to reboot immediately- it won't wait for the game-mode to save data.