From c835698e9f4072262dbd30e8c09ca1b3b0a64aba Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 3 Jul 2009 23:26:00 +0000 Subject: [PATCH] We can't inject the PresentsDObjectMgr because that causes a circular dependency, but we can inject RunQueue which will Guice will magically defer to avoid the circularity. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5847 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/presents/server/ReportManager.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/java/com/threerings/presents/server/ReportManager.java b/src/java/com/threerings/presents/server/ReportManager.java index 8d8ee22f1..47e0c207e 100644 --- a/src/java/com/threerings/presents/server/ReportManager.java +++ b/src/java/com/threerings/presents/server/ReportManager.java @@ -30,6 +30,8 @@ import com.samskivert.util.Interval; import com.samskivert.util.RunQueue; import com.samskivert.util.StringUtil; +import com.threerings.presents.annotation.EventQueue; + import static com.threerings.presents.Log.log; /** @@ -68,7 +70,7 @@ public class ReportManager public void activatePeriodicReport () { // queue up an interval which will generate reports - _reportInterval = new Interval(_omgr) { + _reportInterval = new Interval(_dobjq) { @Override public void expired () { logReport(LOG_REPORT_HEADER + @@ -188,8 +190,8 @@ public class ReportManager /** Used to generate "state of server" reports. */ protected Multimap _reporters = ArrayListMultimap.create(); - // dependencies - @Inject protected PresentsDObjectMgr _omgr; + /** We need to queue up our reporting interval on this feller. */ + @Inject protected @EventQueue RunQueue _dobjq; /** The frequency with which we generate "state of server" reports. */ protected static final long REPORT_INTERVAL = 15 * 60 * 1000L;