Signals

Signals for proxy app.

smarter.apps.proxy.signals.broker_ready = <django.dispatch.dispatcher.Signal object>

Sent when a Proxy broker is ready.

Arguments: broker.

smarter.apps.proxy.signals.proxy_request_completed = <django.dispatch.dispatcher.Signal object>

Sent when the provider has responded to a request that a Proxy forwarded, whatever its status.

For a stream, it is sent when the stream ends. Arguments: proxy, user_profile, method, path, status, usage (a Usage, or None) and elapsed (seconds).

smarter.apps.proxy.signals.proxy_request_failed = <django.dispatch.dispatcher.Signal object>

Sent when a Proxy refuses a request, or cannot reach the provider.

Arguments: proxy, user_profile, method, path, error (a ProxyError) and elapsed (seconds).

Receiver functions for proxy signals.

smarter.apps.proxy.receivers.invalidate_proxy_caches(sender, instance, **kwargs)[source]

Invalidate the owner’s cached Proxy lists, which the web console’s list view uses.

smarter.apps.proxy.receivers.log_broker_ready(sender, broker, **kwargs)[source]

Log when the broker is ready.

smarter.apps.proxy.receivers.log_proxy_request_completed(sender, proxy, user_profile, method, path, status, usage, elapsed, **kwargs)[source]

Log each request that a Proxy forwarded.

smarter.apps.proxy.receivers.log_proxy_request_failed(sender, proxy, user_profile, method, path, error, elapsed, **kwargs)[source]

Log each request that a Proxy refused, or could not forward.