Instead of having to disable the periodic server reports with a cumbersome
specialized ReportManager, let's just not activate them by default. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5846 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -131,9 +131,6 @@ public class PresentsDObjectMgr
|
||||
}
|
||||
});
|
||||
|
||||
// also tell the report manager that we're providing the runqueue for it to do its business
|
||||
repmgr.init(this);
|
||||
|
||||
// register our event helpers
|
||||
registerEventHelpers();
|
||||
}
|
||||
|
||||
@@ -258,9 +258,6 @@ public class PresentsServer
|
||||
/** Handles orderly initialization and shutdown of our managers, etc. */
|
||||
@Inject protected Lifecycle _lifecycle;
|
||||
|
||||
/** Handles generation of state of the server reports. */
|
||||
@Inject protected ReportManager _repmgr;
|
||||
|
||||
/** Used to invoke background tasks that should not be allowed to tie up the distributed object
|
||||
* manager thread (generally talking to databases and other relatively slow entities). */
|
||||
@Inject @MainInvoker protected Invoker _invoker;
|
||||
|
||||
@@ -23,6 +23,7 @@ package com.threerings.presents.server;
|
||||
|
||||
import com.google.common.collect.ArrayListMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
import com.samskivert.util.Interval;
|
||||
@@ -62,12 +63,12 @@ public class ReportManager
|
||||
public static final String PROFILE_TYPE = "profile";
|
||||
|
||||
/**
|
||||
* Starts up our periodic report generation task on the supplied run queue.
|
||||
* Starts up our periodic report generation task.
|
||||
*/
|
||||
public void init (RunQueue rqueue)
|
||||
public void activatePeriodicReport ()
|
||||
{
|
||||
// queue up an interval which will generate reports
|
||||
_reportInterval = new Interval(rqueue) {
|
||||
_reportInterval = new Interval(_omgr) {
|
||||
@Override
|
||||
public void expired () {
|
||||
logReport(LOG_REPORT_HEADER +
|
||||
@@ -187,6 +188,9 @@ public class ReportManager
|
||||
/** Used to generate "state of server" reports. */
|
||||
protected Multimap<String, Reporter> _reporters = ArrayListMultimap.create();
|
||||
|
||||
// dependencies
|
||||
@Inject protected PresentsDObjectMgr _omgr;
|
||||
|
||||
/** The frequency with which we generate "state of server" reports. */
|
||||
protected static final long REPORT_INTERVAL = 15 * 60 * 1000L;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user