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

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

src/a/s/astral-HEAD/astral/api/handlers/tickets.py   astral(Download)
    def _offer_ourselves(cls, stream, destination):
        tickets = Ticket.query.filter_by(source=Node.me())
        if (tickets.count() >= settings.OUTGOING_STREAM_LIMIT
                or Node.me().upstream and tickets.count()
                    * settings.STREAM_BITRATE > Node.me().upstream):
    def _request_stream_from_watchers(cls, stream, destination,
            unconfirmed_tickets=None):
        tickets = []
        for ticket in Ticket.query.filter_by(stream=stream):
            if cls._already_seeding(ticket):