How to use rna - 1 common examples

To help you get started, we’ve selected a few rna examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla / nucleus / nucleus / base / views.py View on Github external
def readiness(request):
    """
    A successful response from this endpoint goes a step further
    and means not only that Django is up and running, but also that
    the database can be successfully used from within this service.
    Some other supporting services (like ElasticSearch) are not checked,
    but we may find that we want/need to add them later.

    Wrapped with `cache_page` to test cache.
    """
    try:
        # Confirm that we can use the database by making a fast query
        # against the Document table. It's not important that the document
        # with the requested primary key exists or not, just that the query
        # completes without error.
        Release.objects.filter(pk=1).exists()
    except DatabaseError as e:
        reason_tmpl = 'service unavailable due to database issue ({!s})'
        status, reason = 503, reason_tmpl.format(e)
    else:
        status, reason = 204, None

    return HttpResponse(status=status, reason=reason)

rna

Basic and essential code building blocks of all pythons

MIT
Latest version published 2 months ago

Package Health Score

81 / 100
Full package analysis

Popular rna functions