Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(9)  |  Derive(0)  |  Import(0)

src/a/s/astral-HEAD/astral/api/handlers/tickets.py   astral(Download)
                return existing_ticket
            if ticket_data:
                source = Node.get_by(uuid=ticket_data['source'])
                if not source:
                    source_node_data = NodesAPI(node.uri()).get(
        destination_uuid = self.get_json_argument('destination_uuid', '')
        if destination_uuid:
            destination = Node.get_by(uuid=destination_uuid)
            # TODO since we only have the IP, we have to assume the port is 8000
            # to be able to request back to it for more details. hmm.

src/a/s/astral-HEAD/astral/node/base.py   astral(Download)
    def node(self):
        return Node.get_by(uuid=self.uuid) or Node.me(uuid_override=self.uuid)
 
    def _unregister_from_origin(self):
        if self.node().supernode:

src/a/s/astral-HEAD/astral/api/handlers/ticket.py   astral(Download)
            return Ticket.get_by(stream=stream, destination=Node.me())
 
        node = Node.get_by(uuid=destination_uuid)
        return Ticket.query.filter_by(stream=stream, destination=node).first()
 

src/a/s/astral-HEAD/astral/api/handlers/nodes.py   astral(Download)
            if children_count > settings.SUPERNODE_MAX_CHILDREN:
                raise HTTPError(503)
        if not Node.get_by(uuid=uuid):
            # TODO what if supernode changes? need to update
            self.request.arguments.setdefault('ip_address',

src/a/s/astral-HEAD/astral/models/stream.py   astral(Download)
    def from_dict(cls, data):
        stream = Stream.get_by(name=data['name'])
        if not stream:
            source = Node.get_by(uuid=data.get('source') or
                    data.get('source_uuid'))

src/a/s/astral-HEAD/astral/api/tests/test_tickets.py   astral(Download)
        eq_(len(result['tickets']), 3)
        for ticket in result['tickets']:
            source = Node.get_by(uuid=ticket['source'])
            destination = Node.get_by(uuid=ticket['destination'])
            ok_(Ticket.get_by(stream=Stream.get_by(slug=ticket['stream']),

src/a/s/astral-HEAD/astral/api/tests/test_node.py   astral(Download)
        response = self.wait()
        eq_(response.code, 200)
        eq_(Node.get_by(uuid=node.uuid), None)