public abstract GetWaitingQueueMessageCount ( string queueName = null ) : int | ||
queueName | string | |
return | int |
int GetWaitingMessageCount(QueueMessageManager manager, int delay = 10) { return manager.GetWaitingQueueMessageCount(QueueName); }
protected override void OnExecuteComplete(QueueMessageManager manager) { base.OnExecuteComplete(manager); LocalDataStoreSlot threadData = Thread.GetNamedDataSlot(STR_STARTTIME_KEY); var watch = Thread.GetData(threadData); int elapsed = 0; if (watch != null) { ((Stopwatch)watch).Stop(); elapsed = (int) ((Stopwatch)watch).ElapsedMilliseconds; } watch = null; Thread.SetData(threadData, watch); int waitingMessages = manager.GetWaitingQueueMessageCount(QueueName); WriteMessage(manager.Item,elapsed,waitingMessages); }