txaio.tx¶
Attributes¶
Classes¶
Internal helper. |
|
Functions¶
|
|
|
|
|
|
|
Set the global log level on all loggers instantiated by txaio. |
|
Start logging to the file-like object in |
|
Module Contents¶
- class _LogObserver(out)[source]¶
Bases:
objectInternal helper.
An observer which formats events to a given file.
- class _TxApi(config)[source]¶
Bases:
object- add_callbacks(future, callback, errback)[source]¶
callback or errback may be None, but at least one must be non-None.
- create_failure(exception=None)[source]¶
Create a Failure instance.
if
exceptionis None (the default), we MUST be inside an “except” block. This encapsulates the exception into an object that implements IFailedFuture
- failure_format_traceback(fail)[source]¶
- Parameters:
fail – must be an IFailedFuture
returns a string
- failure_message(fail)[source]¶
- Parameters:
fail – must be an IFailedFuture
returns a unicode error-message
- failure_traceback(fail)[source]¶
- Parameters:
fail – must be an IFailedFuture
returns a traceback instance
- make_batched_timer(bucket_seconds, chunk_size=100)[source]¶
Creates and returns an object implementing
txaio.IBatchedTimer.- Parameters:
bucket_seconds – the number of seconds in each bucket. That is, a value of 5 means that any timeout within a 5 second window will be in the same bucket, and get notified at the same time. This is only accurate to “milliseconds”.
chunk_size – when “doing” the callbacks in a particular bucket, this controls how many we do at once before yielding to the reactor.