bugfix for new option autosave period
This commit is contained in:
parent
36fad9db50
commit
2557cc5419
@ -85,8 +85,6 @@ public class RefineServlet extends Butterfly {
|
|||||||
|
|
||||||
static final Logger logger = LoggerFactory.getLogger("refine");
|
static final Logger logger = LoggerFactory.getLogger("refine");
|
||||||
|
|
||||||
static protected long AUTOSAVE_PERIOD = 5; // default: 5 minutes
|
|
||||||
|
|
||||||
static protected class AutoSaveTimerTask implements Runnable {
|
static protected class AutoSaveTimerTask implements Runnable {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -131,7 +129,7 @@ public class RefineServlet extends Butterfly {
|
|||||||
FileProjectManager.initialize(s_dataDir);
|
FileProjectManager.initialize(s_dataDir);
|
||||||
ImportingManager.initialize(this);
|
ImportingManager.initialize(this);
|
||||||
|
|
||||||
AUTOSAVE_PERIOD = Long.parseLong(getInitParameter("refine.autosave"));
|
long AUTOSAVE_PERIOD = Long.parseLong(getInitParameter("refine.autosave"));
|
||||||
|
|
||||||
service.scheduleWithFixedDelay(new AutoSaveTimerTask(), AUTOSAVE_PERIOD,
|
service.scheduleWithFixedDelay(new AutoSaveTimerTask(), AUTOSAVE_PERIOD,
|
||||||
AUTOSAVE_PERIOD, TimeUnit.MINUTES);
|
AUTOSAVE_PERIOD, TimeUnit.MINUTES);
|
||||||
|
@ -291,7 +291,7 @@ class RefineServer extends Server {
|
|||||||
if (servlet != null) {
|
if (servlet != null) {
|
||||||
servlet.setInitParameter("refine.data", getDataDir());
|
servlet.setInitParameter("refine.data", getDataDir());
|
||||||
servlet.setInitParameter("butterfly.modules.path", getDataDir() + "/extensions");
|
servlet.setInitParameter("butterfly.modules.path", getDataDir() + "/extensions");
|
||||||
servlet.setInitParameter("refine.autosave", Configurations.get("refine.autosave"));
|
servlet.setInitParameter("refine.autosave", Configurations.get("refine.autosave", "5")); // default: 5 minutes
|
||||||
servlet.setInitOrder(1);
|
servlet.setInitOrder(1);
|
||||||
servlet.doStart();
|
servlet.doStart();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user