Ejemplo n.º 1
0
 /**
  * Constructor.  Private.
  *
  * @param unknown_type $name
  */
 private function __construct($name)
 {
     $conf = Config::Get('cloud');
     if (isset($conf->channel->items[$name])) {
         $this->queue = $name;
         $this->qmanager = MessageQueue::GetQueue($conf->channel->items[$name]->queue);
         $this->db = KeyValueDB::Get($conf->channel->items[$name]->db);
         $this->domain = $conf->channel->items[$name]->domain;
     } else {
         throw new Exception("Cannot find queue named '{$name}' in Config.");
     }
 }
Ejemplo n.º 2
0
 public function addqueue($queue)
 {
     $q = MessageQueue::GetQueue('sqs');
     $q->create_queue($queue);
     vomit($q->list_queues());
 }