akvo.rsr.management.commands.django_q_probettp module

Provides a localhost HTTP server to query the local status of the django-q cluster

class akvo.rsr.management.commands.django_q_probettp.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: BaseCommand

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

help = '\nProvides a localhost HTTP server to query the local status of the django-q cluster\n'
class akvo.rsr.management.commands.django_q_probettp.DjangoQRequestHandler(request, client_address, server)[source]

Bases: BaseHTTPRequestHandler

A handler to be used with HTTPServer to get the status of the local django-q cluster

do_GET()[source]

Handle GET requests to return response with the status code indicating django-q cluster is still running

is_worker_running()[source]
log_message(format: str, *args) None[source]

Log an arbitrary message.

This is used by all other logging functions. Override it if you have specific logging wishes.

The first argument, FORMAT, is a format string for the message to be logged. If the format string contains any % escapes requiring parameters, they should be specified as subsequent arguments (it’s just like printf!).

The client ip and current date/time are prefixed to every message.

Unicode control characters are replaced with escaped hex before writing the output to stderr.