示例#1
0
 private void ClearQueue(Queue q)
 {
     try
     {
         q.Clear();
     }
     catch {
         //TODO: This is here because of a bug in the Endpoint where clearing an empty queue results in a 500 internal server error.
     }
 }
示例#2
0
 public IronMQOperations(string queueName, Token credentials)
 {
     _client = new Client(credentials.Key, credentials.Secret, proto:"http", port:80);
     _queue = _client.Queue(queueName);
 }
示例#3
0
 public Communicate(Queue firstUserMessages, Queue secondUserMessages, string senderName)
 {
     this.firstUserMessages = firstUserMessages;
     this.secondUserMessages = secondUserMessages;
     this.senderName = senderName;
 }
示例#4
0
 private void ClearQueue(Queue q)
 {
     Message msg = null;
     while ((msg  = q.get()) != null)
     {
         q.deleteMessage(msg.Id);
     }
 }