@param string $queue
@param bool   $nowait
@param string $ticket

@return \AMQP\Wire\Writer
762389
public function queuePurge($options)
    {
        $args = new Writer();
        $args->writeShort($options['ticket'])
            ->writeShortStr($options['queue'])
            ->writeBit($options['no_wait']);
        return $args;
    }
829188
public Ticket add(long delay, TimerHandler handler, Object... args)
    {
        if (handler == null) {
            return null;
        }
        Utils.checkArgument(delay > 0, "Delay of a ticket has to be strictly greater than 0");
        final Ticket ticket = new Ticket(this, now(), delay, handler, args);
        insert(ticket);
        return ticket;
    }
716580
def write(self):
        
        if not hasattr(self, 'space'):
            raise AttributeError("A ticket must have a 'space' attribute before you can write it to Assembla.")

        if self.get('number'):  # Modifying an existing ticket
            method = self.space.api._put_json
        else:  # Creating a new ticket
            method = self.space.api._post_json

        return method(
            self,
            space=self.space,
            rel_path=self.space._build_rel_path('tickets'),
        )
544161
public function create(TicketObject $ticket) {
        $response = $this->client->post('tickets', array('ticket' => $ticket));
        return new TicketObject($response);
    }
569328
public function confirmSelect(callable $callback = null, $nowait = false)
    {
        if ($this->mode !== ChannelModeEnum::REGULAR) {
            throw new ChannelException("Channel not in regular mode, cannot change to transactional mode.");
        }

        $response = $this->confirmSelectImpl($nowait);

        if ($response instanceof PromiseInterface) {
            return $response->then(function ($response) use ($callback) {
                $this->enterConfirmMode($callback);
                return $response;
            });

        } else {
            $this->enterConfirmMode($callback);
            return $response;
        }
    }
1012457
public function getTicketSignature($ticket, $nonce, $timestamp, $url): string
    {
        return sha1(sprintf('jsapi_ticket=%s&noncestr=%s&timestamp=%s&url=%s', $ticket, $nonce, $timestamp, $url));
    }
1124799
public function postReply(Ticket $ticket, $replyText, $author, $authorEmail)
    {
        if (filter_var($authorEmail, FILTER_VALIDATE_EMAIL) === false)
        {
            throw new InvalidArgumentException($authorEmail . " is not a valid email address.");
        }

        try {
            $this->httpHelper->patch("/tickets/{$ticket->getTicketID()}",[
                'open' => true,
            ]);
        }
        catch (Exception $e)
        {
            //
        }

        return $this->httpHelper->post("/tickets/{$ticket->getTicketID()}/ticket_replies",[
            'text' => $replyText,
            'incoming' => true,
            'author' => $author,
            'author_email' => $authorEmail,
        ]);
    }
193683
public function close(Ticket $ticket)
    {
        $this->authorize('publicStatus', $ticket);
        $ticket->update([
            'open' => false,
        ]);

        return redirect()->route('laralum_public::tickets.index')->with('success', __('laralum_tickets::general.closed', ['id' => $ticket->id]));
    }
606193
public function setTicket(string $ticket)
    {
        $this->getCache()->set($this->getCacheKey(), $ticket, 1800);

        if (!$this->getCache()->has($this->getCacheKey())) {
            throw new RuntimeException('Failed to cache suite ticket.');
        }

        return $this;
    }
570423
public static BufferedImage showqrcode(String ticket){
		HttpUriRequest httpUriRequest = RequestBuilder.get()
				.setUri(MP_URI + "/cgi-bin/showqrcode")
				.addParameter("ticket", ticket)
				.build();
		CloseableHttpResponse httpResponse = LocalHttpClient.execute(httpUriRequest);
		return getImage(httpResponse);
	}
98913
public function basicPublish( \AMQP\Message $msg, $options = array())
    {
        $default = array('exchange' => '', 'routing_key' => '', 'mandatory' => false, 'immediate' => false,
                         'ticket' => null);
        $options = array_merge($default, $options);
        $options['ticket'] = $this->getTicket($options['ticket']);
        $args = $this->frameBuilder->basicPublish($options);

        $this->sendMethodFrame(array(60, 40), $args);

        $this->connection->sendContent(
            $this->channelId, 60, 0,
            strlen($msg->body),
            $msg->serializeProperties(),
            $msg->body
        );
    }
10389
function(refresh_ticket, level) {

		if (Lava.schema.DEBUG && refresh_ticket == null) Lava.t();

		this._scope_refresh_queues[level][refresh_ticket.index] = null;

	}
272906
public function replyAction(Request $request, $ticketId)
    {
        $ticketManager = $this->get('hackzilla_ticket.ticket_manager');
        $ticket        = $ticketManager->getTicketById($ticketId);

        if (!$ticket) {
            throw $this->createNotFoundException($this->get('translator')->trans('ERROR_FIND_TICKET_ENTITY', [], 'HackzillaTicketBundle'));
        }

        $user = $this->getUserManager()->getCurrentUser();
        $this->getUserManager()->hasPermission($user, $ticket);

        $message = $ticketManager->createMessage($ticket);

        $form = $this->createMessageForm($message);
        $form->handleRequest($request);

        if ($form->isValid()) {
            $message->setUser($user);
            $ticketManager->updateTicket($ticket, $message);
            $this->dispatchTicketEvent(TicketEvents::TICKET_UPDATE, $ticket);

            return $this->redirect($this->generateUrl('hackzilla_ticket_show', ['ticketId' => $ticket->getId()]));
        }

        $data = ['ticket' => $ticket, 'form' => $form->createView()];

        if ($user && $this->get('hackzilla_ticket.user_manager')->hasRole($user, TicketRole::ADMIN)) {
            $data['delete_form'] = $this->createDeleteForm($ticket->getId())->createView();
        }

        return $this->render($this->container->getParameter('hackzilla_ticket.templates')['show'], $data);
    }
953863
private function saveTicket($ticket, $expire)
    {
        $data   = ['ticket' => $ticket, 'expire' => intval($expire), 'time' => time()];
        return ($this->getFileSystem()->put($this->getTicketFilePath(), serialize($data), true) > 0);
    }
184065
def get_nowait_from_queue(queue):
    
    data = []
    for _ in range(queue.qsize()):
        try:
            data.append(queue.get_nowait())
        except q.Empty:
            break
    return data
408094
def cli(env, title, subject_id, body, hardware_identifier, virtual_identifier, priority):
    """"""
    ticket_mgr = SoftLayer.TicketManager(env.client)

    if body is None:
        body = click.edit('\n\n' + ticket.TEMPLATE_MSG)
    created_ticket = ticket_mgr.create_ticket(
        title=title,
        body=body,
        subject=subject_id,
        priority=priority)

    if hardware_identifier:
        hardware_mgr = SoftLayer.HardwareManager(env.client)
        hardware_id = helpers.resolve_id(hardware_mgr.resolve_ids, hardware_identifier, 'hardware')
        ticket_mgr.attach_hardware(created_ticket['id'], hardware_id)

    if virtual_identifier:
        vs_mgr = SoftLayer.VSManager(env.client)
        vs_id = helpers.resolve_id(vs_mgr.resolve_ids, virtual_identifier, 'VS')
        ticket_mgr.attach_virtual_server(created_ticket['id'], vs_id)

    env.fout(ticket.get_ticket_results(ticket_mgr, created_ticket['id']))
216476
public function queueBind($queue, $exchange, $options)
    {
        $args = new Writer();
        $args->writeShort($options['ticket'])
            ->writeShortStr($queue)
            ->writeShortStr($exchange)
            ->writeShortStr($options['routing_key'])
            ->writeBit($options['no_wait'])
            ->writeTable($options['arguments']);
        return $args;
    }