[COI]Naaaath

Force Database Update

13 posts in this topic

Hello,

 

We are currently playing around in the server to fix some bugs, I am just wondering if it is possible to force a DB update? We need to restart the server but we have built a large base and when viewing the DB it hasn't stored all the new items. Is there a command to force the DB to update and then we can restart the server?

 

 

Thanks

Share this post


Link to post
Share on other sites
[] spawn {
    "#lock" call ExileServer_system_rcon_event_sendCommand;
    "Server locked for restart, 15 minutes" call ExileServer_util_log;
    ["notificationRequest",["LockKickWarning",["Server locked for Quick Restart in 15 Minutes"]]] call ExileServer_system_network_send_broadcast;
    uiSleep 5;
    ["notificationRequest",["LockKickWarning",["Fixing Some Bugs"]]] call ExileServer_system_network_send_broadcast;
    ExileServerIsLocked = true;

    uiSleep 900;

    call ExileServer_system_rcon_event_kickAllrestart;
    "Evryone kicked for restart" call ExileServer_util_log;
    call ExileServer_system_rcon_event_clearBuffers;
    "Buffers cleared!" call ExileServer_util_log;
    for "_i" from 0 to 9 do
    {
        "SERVER READY FOR RESTART!!" call ExileServer_util_log;
    };
    ExileServerRestartMode = true;
};


Locks Server
Sending Warning about restart in 15mins
Kicks all players
Flushes the Database update queues
SERVER READY FOR RESTART to ExileServer_util_log (very handy if used with marma.io)
You will see info that server is ready for restart in the server logs.

 

Edited by Torndeco
  • Like 1

Share this post


Link to post
Share on other sites
Advertisement
[] spawn {
    "#lock" call ExileServer_system_rcon_event_sendCommand;
    "Server locked for restart, 15 minutes" call ExileServer_util_log;
    ["notificationRequest",["LockKickWarning",["Server locked for Quick Restart in 15 Minutes"]]] call ExileServer_system_network_send_broadcast;
    uiSleep 5;
    ["notificationRequest",["LockKickWarning",["Fixing Some Bugs"]]] call ExileServer_system_network_send_broadcast;
    ExileServerIsLocked = true;

    uiSleep 900;

    call ExileServer_system_rcon_event_kickAllrestart;
    "Evryone kicked for restart" call ExileServer_util_log;
    call ExileServer_system_rcon_event_clearBuffers;
    "Buffers cleared!" call ExileServer_util_log;
    for "_i" from 0 to 9 do
    {
        "SERVER READY FOR RESTART!!" call ExileServer_util_log;
    };
    ExileServerRestartMode = true;
};


Locks Server
Sending Warning about restart in 15mins
Kicks all players
Flushes the Database update queues
SERVER READY FOR RESTART to ExileServer_util_log (very handy if used with marma.io)
You will see info that server is ready for restart in the server logs.

 

Thank you! Also is there a way to add things to the database and have the items update in game without restarting, for example I add some items to a players vehicle and then it updates without the restart.

 

Edit: Ok I've figured out how to use the debug console, what would the command be to fill the car with specific items?

Edited by [COI]Naaaath

Share this post


Link to post
Share on other sites

Thank you! Also is there a way to add things to the database and have the items update in game without restarting, for example I add some items to a players vehicle and then it updates without the restart.

 

Edit: Ok I've figured out how to use the debug console, what would the command be to fill the car with specific items?

player addMagazineCargo ["PipeBomb", 1];

 

Look at the Wiki on Bohemia's site. All the stuff you need to write your own Mod or extend another (Exile) is there.

Edited by Crazy Harry

Share this post


Link to post
Share on other sites

player addCargo "ItemID";

 

Look at the Wiki on Bohemia's site. All the stuff you need to write your own Mod or extend another (Exile) is there.

I did this but it didn't seem to work, I will give it another shot  thank you :)

Share this post


Link to post
Share on other sites
On 10/10/2015 at 5:53 PM, Torndeco said:

[] spawn {
    "#lock" call ExileServer_system_rcon_event_sendCommand;
    "Server locked for restart, 15 minutes" call ExileServer_util_log;
    ["notificationRequest",["LockKickWarning",["Server locked for Quick Restart in 15 Minutes"]]] call ExileServer_system_network_send_broadcast;
    uiSleep 5;
    ["notificationRequest",["LockKickWarning",["Fixing Some Bugs"]]] call ExileServer_system_network_send_broadcast;
    ExileServerIsLocked = true;

    uiSleep 900;

    call ExileServer_system_rcon_event_kickAllrestart;
    "Evryone kicked for restart" call ExileServer_util_log;
    call ExileServer_system_rcon_event_clearBuffers;
    "Buffers cleared!" call ExileServer_util_log;
    for "_i" from 0 to 9 do
    {
        "SERVER READY FOR RESTART!!" call ExileServer_util_log;
    };
    ExileServerRestartMode = true;
};


Locks Server
Sending Warning about restart in 15mins
Kicks all players
Flushes the Database update queues
SERVER READY FOR RESTART to ExileServer_util_log (very handy if used with marma.io)
You will see info that server is ready for restart in the server logs.

 

How can i implement this into my mission.pbo just for the database updates? 

Share this post


Link to post
Share on other sites

Thats old code, not even sure it still works.
I assume you wanna force database updates, which is a really bad idea for performance reasons.

Regardless Exile Database Sqf code is bugged, that is why people notice vehicles not saving.
(edit: A good few people just assume the server didn't get enough time to shutdown, but this isnt the case. There is very little in the database queue for any long length of time in practice)

Think there is a similiar issue for player syncing but it isn't as bad. Due to it syncing on player d/c (atleast when the eventhandler fires correctly)
 

Share this post


Link to post
Share on other sites
1 hour ago, Torndeco said:

Thats old code, not even sure it still works.
I assume you wanna force database updates, which is a really bad idea for performance reasons.

Regardless Exile Database Sqf code is bugged, that is why people notice vehicles not saving.
(edit: A good few people just assume the server didn't get enough time to shutdown, but this isnt the case. There is very little in the database queue for any long length of time in practice)

Think there is a similiar issue for player syncing but it isn't as bad. Due to it syncing on player d/c (atleast when the eventhandler fires correctly)
 

SO what do you suggest? Going piece by piece and grabbing all the database calls and manually inject the script to force saves on those specific tables?

Meaning vehicles, players, items, and objects? one script, one push to the database. Because its becoming a huge issue on my server. I turned on vehicle, and boat spawns 1 per 3000 and i ended up with 40 rhibs in the tanoa trader. Now i cant sell and delete them because the database, and restart doesn't seem to be saving the sales items. Sell all the rhibs and they return after next restart. I am frustrated, i turned the spawn vehicles off and they still show up even after saving them.

I am going to flush boats and see if i can do it safely without killing the database. It seems a rather hard to believe i caused all of that.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.