Permalink
Browse files

fix some merge problems and expose create_time via a gauge.

  • Loading branch information...
1 parent 94dd781 commit b34e200a5c74a86d3ac9d75e7508b5e40fbf2c5d Robey Pointer committed Mar 7, 2012
View
@@ -62,6 +62,9 @@ new KestrelConfig {
} :: new QueueBuilder {
name = "slow"
syncJournal = 10.milliseconds
+ } :: new QueueBuilder {
+ name = "temporary"
+ defaultReader.maxQueueAge = 15.seconds
}
debugLogQueues = List()
@@ -172,6 +172,7 @@ class Kestrel(defaultQueueBuilder: QueueBuilder, queueBuilders: Seq[QueueBuilder
new PeriodicBackgroundProcess("background-expiration", expirationTimerFrequency.get) {
def periodic() {
Kestrel.this.queueCollection.flushAllExpired()
+ Kestrel.this.queueCollection.deleteExpiredQueues()
}
}.start()
}
@@ -182,9 +183,6 @@ class Kestrel(defaultQueueBuilder: QueueBuilder, queueBuilders: Seq[QueueBuilder
debugLogQueues.foreach { queueName =>
Kestrel.this.queueCollection.debugLog(queueName)
}
- // Now that we've cleaned out the queue, lets see if any of them are
- // ready to be expired.
- Kestrel.this.queueCollection.deleteExpiredQueues()
}
}.start()
}
@@ -127,6 +127,7 @@ class QueueCollection(
Stats.addGauge(prefix + "age_msec")(reader.age.inMilliseconds)
Stats.addGauge(prefix + "open_transactions")(reader.openItems)
Stats.addGauge(prefix + "waiters")(reader.waiterCount)
+ Stats.addGauge(prefix + "create_time")(reader.createTime.inSeconds)
}
}
rv
@@ -145,8 +146,9 @@ class QueueCollection(
Stats.clearGauge(prefix + "mem_items")
Stats.clearGauge(prefix + "mem_bytes")
Stats.clearGauge(prefix + "age_msec")
- Stats.clearGauge(prefix + "waiters")
Stats.clearGauge(prefix + "open_transactions")
+ Stats.clearGauge(prefix + "waiters")
+ Stats.clearGauge(prefix + "create_time")
Stats.removeMetric(prefix + "set_latency_usec")
Stats.removeMetric(prefix + "delivery_latency_msec")
Stats.removeMetric(prefix + "get_timeout_msec")

0 comments on commit b34e200

Please sign in to comment.