Require passing in the DObjectManager for activatePeriodicReport instead of injecting it which was
causing a circular dependency
This commit is contained in:
@@ -23,7 +23,6 @@ package com.threerings.presents.server;
|
|||||||
|
|
||||||
import com.google.common.collect.ArrayListMultimap;
|
import com.google.common.collect.ArrayListMultimap;
|
||||||
import com.google.common.collect.Multimap;
|
import com.google.common.collect.Multimap;
|
||||||
import com.google.inject.Inject;
|
|
||||||
import com.google.inject.Singleton;
|
import com.google.inject.Singleton;
|
||||||
|
|
||||||
import com.samskivert.util.StringUtil;
|
import com.samskivert.util.StringUtil;
|
||||||
@@ -65,10 +64,10 @@ public class ReportManager
|
|||||||
/**
|
/**
|
||||||
* Starts up our periodic report generation task.
|
* Starts up our periodic report generation task.
|
||||||
*/
|
*/
|
||||||
public void activatePeriodicReport ()
|
public void activatePeriodicReport (RootDObjectManager omgr)
|
||||||
{
|
{
|
||||||
// queue up an interval which will generate reports as long as the omgr is alive
|
// queue up an interval which will generate reports as long as the omgr is alive
|
||||||
_omgr.newInterval(new Runnable() {
|
omgr.newInterval(new Runnable() {
|
||||||
public void run () {
|
public void run () {
|
||||||
logReport(LOG_REPORT_HEADER +
|
logReport(LOG_REPORT_HEADER +
|
||||||
generateReport(DEFAULT_TYPE, System.currentTimeMillis(), true));
|
generateReport(DEFAULT_TYPE, System.currentTimeMillis(), true));
|
||||||
@@ -191,9 +190,6 @@ public class ReportManager
|
|||||||
/** Used to generate "state of server" reports. */
|
/** Used to generate "state of server" reports. */
|
||||||
protected Multimap<String, Reporter> _reporters = ArrayListMultimap.create();
|
protected Multimap<String, Reporter> _reporters = ArrayListMultimap.create();
|
||||||
|
|
||||||
/** We use the root omgr to queue up our reporting interval. */
|
|
||||||
@Inject protected RootDObjectManager _omgr;
|
|
||||||
|
|
||||||
/** The frequency with which we generate "state of server" reports. */
|
/** The frequency with which we generate "state of server" reports. */
|
||||||
protected static final long REPORT_INTERVAL = 15 * 60 * 1000L;
|
protected static final long REPORT_INTERVAL = 15 * 60 * 1000L;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user