Fixed character auto save task.

This commit is contained in:
MobiusDevelopment 2019-11-21 18:25:46 +00:00
parent 6d43655b45
commit c61879d264
34 changed files with 51 additions and 52 deletions

View File

@ -182,8 +182,8 @@ ClanVariablesStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8155,7 +8155,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -182,8 +182,8 @@ ClanVariablesStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8162,7 +8162,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -182,8 +182,8 @@ ClanVariablesStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8164,7 +8164,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -182,8 +182,8 @@ ClanVariablesStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8159,7 +8159,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -182,8 +182,8 @@ ClanVariablesStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8137,7 +8137,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -182,8 +182,8 @@ ClanVariablesStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8137,7 +8137,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -182,8 +182,8 @@ ClanVariablesStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8138,7 +8138,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -182,8 +182,8 @@ ClanVariablesStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8099,7 +8099,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -179,8 +179,8 @@ CharacterDataStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -38,7 +38,6 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Level;
@ -8407,7 +8406,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -179,8 +179,8 @@ CharacterDataStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8285,7 +8285,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -182,8 +182,8 @@ ClanVariablesStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8113,7 +8113,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -182,8 +182,8 @@ ClanVariablesStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8114,7 +8114,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -182,8 +182,8 @@ ClanVariablesStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8099,7 +8099,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -182,8 +182,8 @@ ClanVariablesStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8126,7 +8126,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -182,8 +182,8 @@ ClanVariablesStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8126,7 +8126,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -182,8 +182,8 @@ ClanVariablesStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8026,7 +8026,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}

View File

@ -182,8 +182,8 @@ ClanVariablesStoreInterval = 15
LazyItemsUpdate = False
# When enabled, this forces (even if using lazy item updates) the items owned by the character to be updated into DB when saving its character.
# Default: False
UpdateItemsOnCharStore = False
# Default: True
UpdateItemsOnCharStore = True
# Also delete from world misc. items dropped by players (all except equip-able items).
# Notes:

View File

@ -8114,7 +8114,7 @@ public class PlayerInstance extends Playable
{
if ((Config.CHAR_DATA_STORE_INTERVAL > 0) && (_autoSaveTask == null))
{
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, 300_000L, TimeUnit.MINUTES.toMillis(Config.CHAR_DATA_STORE_INTERVAL));
_autoSaveTask = ThreadPool.scheduleAtFixedRate(this::autoSave, Config.CHAR_DATA_STORE_INTERVAL, Config.CHAR_DATA_STORE_INTERVAL);
}
}