Signals

Signals for connection app.

smarter.apps.connection.signals.api_connection_attempted = <django.dispatch.dispatcher.Signal object>

Signal sent when an API connection is attempted.

Parameters:

connection – The API connection instance being attempted.

Example:

api_connection_attempted.send(sender=self.__class__, connection=self)
smarter.apps.connection.signals.api_connection_failed = <django.dispatch.dispatcher.Signal object>

Signal sent when an API connection fails.

Parameters:

connection – The API connection instance that failed.

Example:

api_connection_failed.send(sender=self.__class__, connection=self, response=response, error=None)
smarter.apps.connection.signals.api_connection_query_attempted = <django.dispatch.dispatcher.Signal object>

Signal sent when an API connection query is attempted.

Parameters:

connection – The API connection instance being queried.

Example:

api_connection_query_attempted.send(sender=self.__class__, connection=self)
smarter.apps.connection.signals.api_connection_query_failed = <django.dispatch.dispatcher.Signal object>

Signal sent when an API connection query fails.

Parameters:
  • connection – The API connection instance that was queried.

  • response – The response returned from the API query.

  • error – The error message associated with the failure.

Example:

api_connection_query_failed.send(sender=self.__class__, connection=self, response=response, error=e)
smarter.apps.connection.signals.api_connection_query_success = <django.dispatch.dispatcher.Signal object>

Signal sent when an API connection query is successful.

Parameters:
  • connection – The API connection instance that was queried.

  • response – The response returned from the API query.

Example:

api_connection_query_success.send(sender=self.__class__, connection=self, response=response)
smarter.apps.connection.signals.api_connection_success = <django.dispatch.dispatcher.Signal object>

Signal sent when an API connection is successful.

Parameters:

connection – The API connection instance that was successful.

Example:

api_connection_success.send(sender=self.__class__, connection=self)
smarter.apps.connection.signals.broker_ready = <django.dispatch.dispatcher.Signal object>

Signal sent when a broker achieves a ready state.

Parameters:

broker – The broker instance that is ready.

Example:

broker_ready.send(sender=self.__class__, broker=self)
smarter.apps.connection.signals.sql_connection_attempted = <django.dispatch.dispatcher.Signal object>

Signal sent when a SQL connection is attempted.

Parameters:

connection – The SQL connection instance being attempted.

Example:

sql_connection_attempted.send(sender=self.__class__, connection=self)
smarter.apps.connection.signals.sql_connection_failed = <django.dispatch.dispatcher.Signal object>

Signal sent when a SQL connection fails.

Parameters:
  • connection – The SQL connection instance that failed.

  • error – The error message associated with the failure.

Example:

sql_connection_failed.send(sender=self.__class__, connection=self, error=msg)
smarter.apps.connection.signals.sql_connection_query_attempted = <django.dispatch.dispatcher.Signal object>

Signal sent when a SQL connection query is attempted.

Parameters:
  • connection – The SQL connection instance being queried.

  • sql – The SQL query being executed.

  • limit – The limit applied to the query (if any).

Example:

sql_connection_query_attempted.send(sender=self.__class__, connection=self, sql=sql, limit=limit)
smarter.apps.connection.signals.sql_connection_query_failed = <django.dispatch.dispatcher.Signal object>

Signal sent when a SQL connection query fails.

Parameters:
  • connection – The SQL connection instance that was queried.

  • sql – The SQL query that was executed.

  • limit – The limit applied to the query (if any).

  • error – The error message associated with the failure.

Example:

sql_connection_query_failed.send(
    sender=self.__class__, connection=self, sql=sql, limit=limit, error=str(e)
)
smarter.apps.connection.signals.sql_connection_query_success = <django.dispatch.dispatcher.Signal object>

Signal sent when a SQL connection query is successful.

Parameters:
  • connection – The SQL connection instance that was queried.

  • sql – The SQL query that was executed.

  • limit – The limit applied to the query (if any).

Example:

sql_connection_query_success.send(sender=self.__class__, connection=self, sql=sql, limit=limit)
smarter.apps.connection.signals.sql_connection_success = <django.dispatch.dispatcher.Signal object>

Signal sent when a SQL connection is successful.

Parameters:

connection – The SQL connection instance that was successful.

Example:

sql_connection_success.send(sender=self.__class__, connection=self)
smarter.apps.connection.signals.sql_connection_validated = <django.dispatch.dispatcher.Signal object>

Signal sent when a SQL connection is validated.

Parameters:

connection – The SQL connection instance that was validated.

Example:

sql_connection_validated.send(sender=self.__class__, connection=self)