Toggle navigation sidebar
Toggle in-page Table of Contents
async-worker
Incompatibilidades
Compatibilidade de Versões do asyncworker
Atualizando sua app Async-worker
Atualizando para 0.20.2
Atualizando para 0.20.1
Atualizando para 0.20.0
Atualizando para 0.19.0
Atualizando para 0.18.0
Atualizando para 0.17.0
Atualizando para 0.16.0
Atualizando para 0.15.0
Atualizando para 0.14.0
Atualizando para 0.13.0
Atualizando para 0.12.0
Atualizando para 0.11.0
Guia de uso
Início rápido
Asyncworker App
Sobre a classe principal App
Compartilhamento de dados e inicializações assíncronas
Hooks de startup e shudtdown
Tipos de Handlers
HTTP
Registrando um novo handler HTTP
Métricas expostas para aplicações HTTP
RabbitMQ
Parametros adicionais para o decorator app.amqp.consume()
Conectando a um Broker usando SSL
Métricas expostas para aplicações RabbitMQ
Métricas
Configurando exposição de Métricas
Tipos de Métricas
Counter
Gauge
Histograma
Métricas expostas automaticamente
Integração com Grafana
Utilitários
Timeit
Rodando uma função em um intervalo fixo de tempo
Guia de desenvolvimento
Aplicando decorators customizados a um handler HTTP
Escrevendo Testes Unitários
Como fechar uma nova versão do async-worker
Índice
A
|
B
|
C
|
D
|
E
|
F
|
G
|
H
|
I
|
J
|
K
|
L
|
M
|
N
|
O
|
P
|
Q
|
R
|
S
|
T
|
U
|
V
|
W
A
accept() (método asyncworker.rabbitmq.message.RabbitMQMessage)
ACK (atributo asyncworker.options.Actions)
ack() (método asyncworker.easyqueue.message.AMQPMessage)
Actions (classe em asyncworker.options)
add() (método asyncworker.connections.ConnectionsMapping)
add_amqp_route() (método asyncworker.routes.RoutesRegistry)
add_http_route() (método asyncworker.routes.RoutesRegistry)
add_route() (método asyncworker.routes.RoutesRegistry)
aiohttp_routes() (método asyncworker.routes.HTTPRoute)
allow_mutation (atributo asyncworker.conf.Settings.Config)
amqp (propriedade asyncworker.app.App )
AMQP_DEFAULT_HEARTBEAT (atributo asyncworker.conf.Settings)
AMQP_DEFAULT_PORT (atributo asyncworker.conf.Settings)
AMQP_DEFAULT_PREFETCH_COUNT (atributo asyncworker.conf.Settings)
AMQP_DEFAULT_VHOST (atributo asyncworker.conf.Settings)
AMQP_RABBITMQ (atributo asyncworker.options.RouteTypes)
amqp_routes (atributo asyncworker.routes.RoutesRegistry)
AMQPConnection (classe em asyncworker.connections)
(classe em asyncworker.easyqueue.connection)
AMQPConnection.Config (classe em asyncworker.connections)
AMQPMessage (classe em asyncworker.easyqueue.message)
AMQPRoute (classe em asyncworker.routes)
AMQPRouteEntryPointImpl (classe em asyncworker.rabbitmq.entrypoints)
AMQPRouteOptions (classe em asyncworker.routes)
AMQPRouteOptions.Config (classe em asyncworker.routes)
App (classe em asyncworker.app)
arbitrary_types_allowed (atributo asyncworker.connections.AMQPConnection.Config)
(atributo asyncworker.routes.AMQPRouteOptions.Config)
ArgResolver (classe em asyncworker.types.resolver)
asyncworker
módulo
asyncworker.app
módulo
asyncworker.bucket
módulo
asyncworker.conf
módulo
asyncworker.connections
módulo
asyncworker.consumer
módulo
asyncworker.decorators
módulo
asyncworker.easyqueue
módulo
asyncworker.easyqueue.connection
módulo
asyncworker.easyqueue.exceptions
módulo
asyncworker.easyqueue.message
módulo
asyncworker.easyqueue.queue
módulo
asyncworker.entrypoints
módulo
asyncworker.exceptions
módulo
asyncworker.http
módulo
asyncworker.http.decorators
módulo
asyncworker.http.entrypoints
módulo
asyncworker.http.methods
módulo
asyncworker.http.types
módulo
asyncworker.http.wrapper
módulo
asyncworker.metrics
módulo
asyncworker.metrics.aiohttp_resources
módulo
asyncworker.metrics.buckets
módulo
asyncworker.metrics.collectors
módulo
asyncworker.metrics.collectors.base
módulo
asyncworker.metrics.collectors.gc
módulo
asyncworker.metrics.collectors.platform
módulo
asyncworker.metrics.collectors.process
módulo
asyncworker.metrics.definitions
módulo
asyncworker.metrics.definitions.amqp
módulo
asyncworker.metrics.definitions.http
módulo
asyncworker.metrics.registry
módulo
asyncworker.metrics.types
módulo
asyncworker.options
módulo
asyncworker.rabbitmq
módulo
asyncworker.rabbitmq.entrypoints
módulo
asyncworker.rabbitmq.message
módulo
asyncworker.routes
módulo
asyncworker.signals
módulo
asyncworker.signals.base
módulo
asyncworker.signals.handlers
módulo
asyncworker.signals.handlers.base
módulo
asyncworker.signals.handlers.http
módulo
asyncworker.signals.handlers.rabbitmq
módulo
asyncworker.task_runners
módulo
asyncworker.testing
módulo
asyncworker.time
módulo
asyncworker.types
módulo
asyncworker.types.registry
módulo
asyncworker.types.resolver
módulo
asyncworker.typing
módulo
asyncworker.utils
módulo
AutoNameEnum (classe em asyncworker.options)
B
BaseCollector (classe em asyncworker.metrics.collectors.base)
BaseJsonQueue (classe em asyncworker.easyqueue.queue)
BaseQueue (classe em asyncworker.easyqueue.queue)
body (propriedade asyncworker.rabbitmq.message.RabbitMQMessage )
BoolModel (classe em asyncworker.http.types)
Bucket (classe em asyncworker.bucket)
BucketFullException
BULK_FLUSH_INTERVAL (atributo asyncworker.options.DefaultValues)
(atributo asyncworker.options.Options)
bulk_flush_interval (atributo asyncworker.routes.AMQPRouteOptions)
BULK_SIZE (atributo asyncworker.options.DefaultValues)
(atributo asyncworker.options.Options)
bulk_size (atributo asyncworker.routes.AMQPRouteOptions)
C
call_http_handler() (no módulo asyncworker.routes)
can_dispatch_task() (método asyncworker.task_runners.ScheduledTaskRunner)
channel (atributo asyncworker.easyqueue.message.AMQPMessage)
ClockTicker (classe em asyncworker.time)
close() (método asyncworker.easyqueue.connection.AMQPConnection)
collect() (método asyncworker.metrics.collectors.base.BaseCollector)
(método asyncworker.metrics.collectors.gc.GCCollector)
(método asyncworker.metrics.collectors.platform.PlatformCollector)
conn_for() (método asyncworker.easyqueue.queue.JsonQueue)
connection (atributo asyncworker.easyqueue.message.AMQPMessage)
(atributo asyncworker.routes.AMQPRoute)
(atributo asyncworker.routes.AMQPRouteOptions)
(atributo asyncworker.routes.Route)
Connection (classe em asyncworker.connections)
CONNECTION_FAIL_CALLBACK (atributo asyncworker.options.Options)
connection_fail_callback (atributo asyncworker.routes.AMQPRouteOptions)
connection_parameters (propriedade asyncworker.easyqueue.connection.AMQPConnection )
connections (atributo asyncworker.connections.AMQPConnection)
ConnectionsMapping (classe em asyncworker.connections)
ConnType (classe em asyncworker.easyqueue.queue)
CONSUME (atributo asyncworker.easyqueue.queue.ConnType)
consume() (método asyncworker.easyqueue.queue.JsonQueue)
(método asyncworker.rabbitmq.entrypoints.AMQPRouteEntryPointImpl)
consume_all_queues() (método asyncworker.consumer.Consumer)
Consumer (classe em asyncworker.consumer)
content_type (atributo asyncworker.easyqueue.queue.BaseJsonQueue)
Counter (classe em asyncworker.metrics.types)
D
DefaultValues (classe em asyncworker.options)
DELETE (atributo asyncworker.http.methods.HTTPMethods)
delete() (método asyncworker.http.entrypoints.HTTPEntryPointImpl)
delivery_tag (atributo asyncworker.easyqueue.message.AMQPMessage)
DeliveryModes (classe em asyncworker.easyqueue.queue)
deserialize() (método asyncworker.easyqueue.queue.BaseJsonQueue)
(método asyncworker.easyqueue.queue.BaseQueue)
(método asyncworker.easyqueue.queue.JsonQueue)
deserialized_data (propriedade asyncworker.easyqueue.message.AMQPMessage )
E
EmptyQueueException
entrypoint() (no módulo asyncworker.utils)
EntrypointInterface (classe em asyncworker.entrypoints)
env_prefix (atributo asyncworker.conf.Settings.Config)
Events (classe em asyncworker.options)
exponential_buckets() (no módulo asyncworker.metrics.buckets)
extra (atributo asyncworker.routes.AMQPRouteOptions.Config)
F
factory() (método estático asyncworker.routes.Route)
FLUSH_TIMEOUT (atributo asyncworker.conf.Settings)
Freezable (classe em asyncworker.signals.base)
freeze() (método asyncworker.app.App)
(método asyncworker.signals.base.Freezable)
from_request() (método de classe asyncworker.http.types.PathParam)
(método de classe asyncworker.http.types.RequestParser)
frozen (propriedade asyncworker.signals.base.Freezable )
G
Gauge (classe em asyncworker.metrics.types)
GCCollector (classe em asyncworker.metrics.collectors.gc)
GET (atributo asyncworker.http.methods.HTTPMethods)
get() (método asyncworker.http.entrypoints.HTTPEntryPointImpl)
(método asyncworker.routes.Model)
(método asyncworker.types.registry.TypesRegistry)
get_args() (no módulo asyncworker.typing)
get_connection() (método asyncworker.app.App)
get_connection_for_route() (método asyncworker.app.App)
get_handler_original_qualname() (no módulo asyncworker.typing)
get_handler_original_typehints() (no módulo asyncworker.typing)
get_origin() (no módulo asyncworker.typing)
H
handler (atributo asyncworker.routes.Route)
handlers (atributo asyncworker.app.App)
has_channel_ready() (método asyncworker.easyqueue.connection.AMQPConnection)
HEAD (atributo asyncworker.http.methods.HTTPMethods)
head() (método asyncworker.http.entrypoints.HTTPEntryPointImpl)
heartbeat (atributo asyncworker.connections.AMQPConnection)
Histogram (classe em asyncworker.metrics.types)
hostname (atributo asyncworker.connections.AMQPConnection)
HTTP (atributo asyncworker.options.RouteTypes)
http (propriedade asyncworker.app.App )
http_client() (no módulo asyncworker.testing)
http_handler_wrapper() (no módulo asyncworker.routes)
HTTP_HOST (atributo asyncworker.conf.Settings)
http_metrics_middleware() (no módulo asyncworker.metrics.aiohttp_resources)
HTTP_PORT (atributo asyncworker.conf.Settings)
http_request (atributo asyncworker.http.wrapper.RequestWrapper)
http_routes (atributo asyncworker.routes.RoutesRegistry)
HttpClientContext (classe em asyncworker.testing)
HTTPEntryPointImpl (classe em asyncworker.http.entrypoints)
HTTPMethods (classe em asyncworker.http.methods)
HTTPRoute (classe em asyncworker.routes)
HTTPServer (classe em asyncworker.signals.handlers.http)
I
InvalidConnection
InvalidMessageSizeException
InvalidRoute
is_base_type() (no módulo asyncworker.typing)
is_connected (propriedade asyncworker.easyqueue.connection.AMQPConnection )
is_empty() (método asyncworker.bucket.Bucket)
is_full() (método asyncworker.bucket.Bucket)
items() (método asyncworker.connections.AMQPConnection)
J
JsonQueue (classe em asyncworker.easyqueue.queue)
K
keep_runnig() (método asyncworker.consumer.Consumer)
keys() (método asyncworker.connections.AMQPConnection)
(método asyncworker.routes.Model)
L
linear_buckets() (no módulo asyncworker.metrics.buckets)
LOGLEVEL (atributo asyncworker.conf.Settings)
M
MAX_CONCURRENCY (atributo asyncworker.options.Options)
MessageError
methods (atributo asyncworker.routes.HTTPRoute)
Metric (classe em asyncworker.metrics.types)
METRICS_APPPREFIX (atributo asyncworker.conf.Settings)
METRICS_DEFAULT_HISTOGRAM_BUCKETS_IN_MS (atributo asyncworker.conf.Settings)
METRICS_NAMESPACE (atributo asyncworker.conf.Settings)
METRICS_ROUTE_ENABLED (atributo asyncworker.conf.Settings)
metrics_route_handler() (no módulo asyncworker.metrics.aiohttp_resources)
METRICS_ROUTE_PATH (atributo asyncworker.conf.Settings)
MissingTypeAnnotationError
Model (classe em asyncworker.routes)
módulo
asyncworker
asyncworker.app
asyncworker.bucket
asyncworker.conf
asyncworker.connections
asyncworker.consumer
asyncworker.decorators
asyncworker.easyqueue
asyncworker.easyqueue.connection
asyncworker.easyqueue.exceptions
asyncworker.easyqueue.message
asyncworker.easyqueue.queue
asyncworker.entrypoints
asyncworker.exceptions
asyncworker.http
asyncworker.http.decorators
asyncworker.http.entrypoints
asyncworker.http.methods
asyncworker.http.types
asyncworker.http.wrapper
asyncworker.metrics
asyncworker.metrics.aiohttp_resources
asyncworker.metrics.buckets
asyncworker.metrics.collectors
asyncworker.metrics.collectors.base
asyncworker.metrics.collectors.gc
asyncworker.metrics.collectors.platform
asyncworker.metrics.collectors.process
asyncworker.metrics.definitions
asyncworker.metrics.definitions.amqp
asyncworker.metrics.definitions.http
asyncworker.metrics.registry
asyncworker.metrics.types
asyncworker.options
asyncworker.rabbitmq
asyncworker.rabbitmq.entrypoints
asyncworker.rabbitmq.message
asyncworker.routes
asyncworker.signals
asyncworker.signals.base
asyncworker.signals.handlers
asyncworker.signals.handlers.base
asyncworker.signals.handlers.http
asyncworker.signals.handlers.rabbitmq
asyncworker.task_runners
asyncworker.testing
asyncworker.time
asyncworker.types
asyncworker.types.registry
asyncworker.types.resolver
asyncworker.typing
asyncworker.utils
N
name (atributo asyncworker.connections.AMQPConnection)
(atributo asyncworker.connections.Connection)
NON_PERSISTENT (atributo asyncworker.easyqueue.queue.DeliveryModes)
O
on_before_start_consumption() (método asyncworker.consumer.Consumer)
(método asyncworker.easyqueue.queue.QueueConsumerDelegate)
on_connection_error() (método asyncworker.consumer.Consumer)
(método asyncworker.easyqueue.queue.QueueConsumerDelegate)
on_consumption_start() (método asyncworker.consumer.Consumer)
(método asyncworker.easyqueue.queue.QueueConsumerDelegate)
ON_EXCEPTION (atributo asyncworker.options.DefaultValues)
(atributo asyncworker.options.Events)
on_exception (atributo asyncworker.routes.AMQPRouteOptions)
on_message_handle_error() (método asyncworker.consumer.Consumer)
(método asyncworker.easyqueue.queue.QueueConsumerDelegate)
on_queue_error() (método asyncworker.consumer.Consumer)
on_queue_message() (método asyncworker.consumer.Consumer)
(método asyncworker.easyqueue.queue.QueueConsumerDelegate)
ON_SUCCESS (atributo asyncworker.options.DefaultValues)
(atributo asyncworker.options.Events)
on_success (atributo asyncworker.routes.AMQPRouteOptions)
options (atributo asyncworker.routes.AMQPRoute)
(atributo asyncworker.routes.HTTPRoute)
(atributo asyncworker.routes.Route)
Options (classe em asyncworker.options)
P
parse_path() (no módulo asyncworker.http.decorators)
password (atributo asyncworker.connections.AMQPConnection)
PATCH (atributo asyncworker.http.methods.HTTPMethods)
patch() (método asyncworker.http.entrypoints.HTTPEntryPointImpl)
PathParam (classe em asyncworker.http.types)
perf_counter_ms() (no módulo asyncworker.time)
PERSISTENT (atributo asyncworker.easyqueue.queue.DeliveryModes)
PlatformCollector (classe em asyncworker.metrics.collectors.platform)
pop_all() (método asyncworker.bucket.Bucket)
port (atributo asyncworker.connections.AMQPConnection)
POST (atributo asyncworker.http.methods.HTTPMethods)
post() (método asyncworker.http.entrypoints.HTTPEntryPointImpl)
prefetch (atributo asyncworker.connections.AMQPConnection)
process_exception() (método asyncworker.rabbitmq.message.RabbitMQMessage)
process_success() (método asyncworker.rabbitmq.message.RabbitMQMessage)
PUT (atributo asyncworker.http.methods.HTTPMethods)
put() (método asyncworker.bucket.Bucket)
(método asyncworker.connections.AMQPConnection)
(método asyncworker.easyqueue.queue.JsonQueue)
(método asyncworker.http.entrypoints.HTTPEntryPointImpl)
Q
queue_name (atributo asyncworker.easyqueue.message.AMQPMessage)
(propriedade asyncworker.consumer.Consumer )
QueueConsumerDelegate (classe em asyncworker.easyqueue.queue)
R
RabbitMQ (classe em asyncworker.signals.handlers.rabbitmq)
RabbitMQMessage (classe em asyncworker.rabbitmq.message)
register() (método asyncworker.connections.AMQPConnection)
RegistryItem (classe em asyncworker.types.registry)
REJECT (atributo asyncworker.options.Actions)
reject() (método asyncworker.easyqueue.message.AMQPMessage)
(método asyncworker.rabbitmq.message.RabbitMQMessage)
RequestParser (classe em asyncworker.http.types)
RequestParserAnnotationSpec (classe em asyncworker.http.entrypoints)
RequestWrapper (classe em asyncworker.http.wrapper)
REQUEUE (atributo asyncworker.options.Actions)
resolve_param() (método asyncworker.types.resolver.ArgResolver)
Route (classe em asyncworker.routes)
route() (método asyncworker.app.App)
route_for() (método asyncworker.routes.RoutesRegistry)
route_path_for_request() (no módulo asyncworker.metrics.aiohttp_resources)
route_type (atributo asyncworker.connections.Connection)
routes (atributo asyncworker.routes.Route)
RoutesRegistry (classe em asyncworker.routes)
RouteTypes (classe em asyncworker.options)
run() (método asyncworker.app.App)
run_every() (método asyncworker.app.App)
RUN_EVERY_MAX_CONCURRENCY (atributo asyncworker.options.DefaultValues)
run_on_shutdown() (método asyncworker.app.App)
run_on_startup() (método asyncworker.app.App)
S
ScheduledTaskRunner (classe em asyncworker.task_runners)
send() (método asyncworker.signals.base.Signal)
serialize() (método asyncworker.easyqueue.queue.BaseJsonQueue)
(método asyncworker.easyqueue.queue.BaseQueue)
(método asyncworker.easyqueue.queue.JsonQueue)
serialized_data (atributo asyncworker.easyqueue.message.AMQPMessage)
(propriedade asyncworker.rabbitmq.message.RabbitMQMessage )
set() (método asyncworker.types.registry.TypesRegistry)
set_connections() (método de classe asyncworker.connections.AMQPConnection)
Settings (classe em asyncworker.conf)
Settings.Config (classe em asyncworker.conf)
shutdown() (método asyncworker.app.App)
(método asyncworker.signals.handlers.base.SignalHandler)
(método asyncworker.signals.handlers.http.HTTPServer)
shutdown_os_signals (atributo asyncworker.app.App)
Signal (classe em asyncworker.signals.base)
SignalHandler (classe em asyncworker.signals.handlers.base)
ssl (atributo asyncworker.connections.AMQPConnection)
start() (método asyncworker.consumer.Consumer)
(método asyncworker.task_runners.ScheduledTaskRunner)
startup() (método asyncworker.app.App)
(método asyncworker.signals.handlers.base.SignalHandler)
(método asyncworker.signals.handlers.http.HTTPServer)
(método asyncworker.signals.handlers.rabbitmq.RabbitMQ)
stop() (método asyncworker.task_runners.ScheduledTaskRunner)
(método asyncworker.time.ClockTicker)
T
Timeit (classe em asyncworker.utils)
TRANSACTIONS_KEY (atributo asyncworker.utils.Timeit)
type (atributo asyncworker.routes.AMQPRoute)
(atributo asyncworker.routes.HTTPRoute)
(atributo asyncworker.routes.Route)
types_registry (atributo asyncworker.http.wrapper.RequestWrapper)
TypesRegistry (classe em asyncworker.types.registry)
U
UndecodableMessageException
unpack() (método asyncworker.http.types.RequestParser)
used (propriedade asyncworker.bucket.Bucket )
username (atributo asyncworker.connections.AMQPConnection)
V
validate_method() (método de classe asyncworker.routes.HTTPRoute)
value (atributo asyncworker.http.types.BoolModel)
values() (método asyncworker.connections.AMQPConnection)
verify_ssl (atributo asyncworker.connections.AMQPConnection)
vhost (atributo asyncworker.routes.AMQPRoute)
W
with_type() (método asyncworker.connections.ConnectionsMapping)
wrap() (método asyncworker.types.resolver.ArgResolver)
wraps() (no módulo asyncworker.decorators)
WRITE (atributo asyncworker.easyqueue.queue.ConnType)