API Reference
arrlio.settings
ENV_PREFIX
module-attribute
Environment prefix by default.
RESULT_BACKEND
module-attribute
Default result backend module.
EVENT_BACKEND
module-attribute
Default evnt backend module.
TASK_PRIORITY
module-attribute
Task default priority. Lower number means higher priority.
TASK_RESULT_RETURN
module-attribute
Is it necessary to return the task result by default.
TASK_EVENTS
module-attribute
Will events be generated for the task. Requires arrlio.plugins.events
plugin.
arrlio.configs
SerializerConfig
Bases: BaseSettings
, ModuleConfigValidatorMixIn
Config for serializer module.
Attributes:
-
module
(SerializerModule
) –Serializer module as module path or
SerializerModule
instance. Default. -
config
(ModuleConfig
) –Module config as
dict
ormodule.Config
instances.
Examples:
Source code in arrlio/configs.py
BrokerModuleConfig
Bases: BaseSettings
, ModuleConfigValidatorMixIn
Config for broker module.
Default env prefix: ${ENV_PREFIX}BROKER_
.
Attributes:
-
module
(BrokerModule
) –Broker module as module path or
BrokerModule
instance. -
config
(ModuleConfig
) –Module config as
dict
ormodule.Config
instances.
Examples:
Source code in arrlio/configs.py
ResultBackendModuleConfig
Bases: BaseSettings
, ModuleConfigValidatorMixIn
Config for result backend module.
Default env prefix: ${ENV_PREFIX}RESULT_BACKEND_
.
Attributes:
-
module
(ResultBackendModule
) –Result backend module as module path or
ResultBackendModule
instance. -
config
(ModuleConfig
) –Module config as
dict
ormodule.Config
instances.
Examples:
Source code in arrlio/configs.py
EventBackendModuleConfig
Bases: BaseSettings
, ModuleConfigValidatorMixIn
Config for event backend module.
Default env prefix: ${ENV_PREFIX}EVENT_BACKEND_
.
Attributes:
-
module
(EventBackendModule
) –Event backend module as module path or
EventBackendModule
instance. -
config
(ModuleConfig
) –Module config as
dict
ormodule.Config
instances.
Examples:
Source code in arrlio/configs.py
TaskConfig
Bases: BaseSettings
Config for task.
Attributes:
-
queue
(str
) –Default queue name for task. Default.
-
priority
(TaskPriority
) –Default task priority. Default.
-
timeout
(Optional[Timeout]
) –Default task excution timeout in seconds. Default.
-
ttl
(Optional[TTL]
) –Default task TTL in seconds. Default.
-
ack_late
(bool
) –Task ack late options. Default.
-
result_return
(bool
) –Is it necessary to return the task result by default. Default.
-
result_ttl
(Optional[TTL]
) –Result TTL in seconds. Default.
-
events
(set[str] | bool
) –Will events be generated for task. This option requires
arrlio.plugins.events
plugin. Default.
Source code in arrlio/configs.py
EventConfig
Bases: BaseSettings
Config for event.
Default env prefix: ${ENV_PREFIX}EVENT_
.
Attributes:
-
ttl
(Optional[TTL]
) –Event TTL in seconds. Default
Source code in arrlio/configs.py
PluginModuleConfig
Bases: ModuleConfigValidatorMixIn
, BaseSettings
Config for plugin module.
Attributes:
-
module
(PluginModule
) –Plugin module as module path or
PluginModule
instance. -
config
(ModuleConfig
) –Module config as
dict
ormodule.Config
instances.
Source code in arrlio/configs.py
ExecutorModuleConfig
Bases: ModuleConfigValidatorMixIn
, BaseSettings
Config for executor module.
Default env prefix: ${ENV_PREFIX}EXECUTOR_
.
Attributes:
-
module
(ExecutorModule
) –Executor module as module path or
ExecutorModule
instance. -
config
(ModuleConfig
) –Module config as
dict
ormodule.Config
instances.
Source code in arrlio/configs.py
Config
Bases: BaseSettings
Arrlio application main config.
Attributes:
-
app_id
(Annotated[str, MinLen(4)]
) –Arrlio application Id.
-
broker
(BrokerModuleConfig
) –Broker module config.
-
result_backend
(ResultBackendModuleConfig
) –Result backend module config.
-
event_backend
(EventBackendModuleConfig
) –Event backend module config.
-
task
(TaskConfig
) –Task config.
-
event
(EventConfig
) –Event config.
-
task_queues
(UniqueList[str]
) –Task queues to consume.
-
plugins
(list[PluginModuleConfig]
) –List of plugins.
-
executor
(ExecutorModuleConfig
) –Executor module config.
Source code in arrlio/configs.py
arrlio.models
FuncProxy
Proxy class for function object.
Source code in arrlio/models.py
Shared
Bases: MutableMapping
Object to share settings between broker/result_backend/event_backend.
Source code in arrlio/models.py
Task
dataclass
Task.
Attributes:
-
func
(Callable | AsyncCallable
) –Task function.
-
name
(str
) –Task name.
-
queue
(str
) –Task queue. Default.
-
priority
(TaskPriority
) – -
timeout
(Timeout
) –Task timeout in seconds. Default.
-
ttl
(Timeout
) –Task TTL in seconds. Default.
-
ack_late
(bool
) –Ack late option. Default.
-
result_ttl
(Timeout
) –Task result TTL in seconds. Default.
-
result_return
(bool
) –Whether the worker should return or not the result of the task. Default.
-
thread
(Optional[bool]
) –Should
Executor
execute task in the separate thread. -
events
(bool | set[str]
) –Enable or disable events for the task. Default.
-
event_ttl
(Timeout
) –Event TTL in seconds. Default.
-
headers
(dict
) –Task headers.
-
loads
(Optional[Callable]
) –Function to load task arguments.
-
dumps
(Optional[Callable]
) –Function to dump task result.
Source code in arrlio/models.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
|
__call__
asdict
Convert to dict.
Parameters:
-
exclude
(list[str] | None
, default:None
) –fields to exclude.
-
sanitize
(bool | None
, default:None
) –flag to sanitize sensitive data.
Returns:
-
dict
–Task
asdict
.
Source code in arrlio/models.py
instantiate
instantiate(
task_id: TaskId | None = None,
args: Args | None = None,
kwds: Kwds | None = None,
meta: dict | None = None,
headers: dict | None = None,
**kwargs,
) -> TaskInstance
Instantiate new TaskInstance
object with provided arguments.
Parameters:
-
task_id
(TaskId | None
, default:None
) –Task Id.
-
args
(Args | None
, default:None
) –Task positional arguments.
-
kwds
(Kwds | None
, default:None
) –Task keyword arguments.
-
meta
(dict | None
, default:None
) –Task additional
meta
keyword argument. -
headers
(dict | None
, default:None
) –Task headers.
Returns:
-
TaskInstance
–Task instance.
Source code in arrlio/models.py
TaskInstance
dataclass
Bases: Task
Task instance dataclass
.
Attributes:
-
task_id
(UUID
) –Task Id.
-
args
(Args
) –Task function positional arguments.
-
kwds
(Kwds
) –Task function keyword arguments.
-
meta
(dict
) –Task function additional
meta
keyword argument.
Source code in arrlio/models.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
|
asdict
Convert to dict.
Parameters:
-
exclude
(list[str] | None
, default:None
) –fields to exclude.
-
sanitize
(bool | None
, default:None
) –flag to sanitize sensitive data.
Returns:
-
dict
–TaskInstance
asdict
.
Source code in arrlio/models.py
__call__
Call TaskInstance
.
Parameters:
-
meta
(bool | None
, default:None
) –Add additional keyword argument
meta
to the task function call.
Source code in arrlio/models.py
TaskResult
dataclass
Task result dataclass
.
Attributes:
-
res
(Any
) –Task result.
-
exc
(Optional[Exception | tuple[str, str, str]]
) –Task exception.
-
trb
(Optional[TracebackType | str]
) –Task exception traceback.
-
idx
(Optional[tuple[str, int]]
) –Result index.
-
routes
(Optional[str | list[str]]
) –Task result routes.
Source code in arrlio/models.py
asdict
Convert to dict.
Parameters:
-
sanitize
(bool | None
, default:None
) –flag to sanitize sensitive data.
Returns:
-
dict
–TaskResult
asdict
.
Source code in arrlio/models.py
Event
dataclass
Event dataclass
.
Attributes:
-
type
(str
) –Event type.
-
event_id
(UUID
) –Event Id.
-
dt
(Optional[datetime]
) –Event datetime.
-
ttl
(Timeout
) –Event TTL in seconds.
Source code in arrlio/models.py
asdict
Convert to dict.
Parameters:
-
sanitize
(bool | None
, default:None
) –flag to sanitize sensitive data.
Returns:
-
dict
–Event
asdict
.
Source code in arrlio/models.py
Graph
Graph class.
Parameters:
-
name
(str
) –graph name.
-
nodes
(dict[str, list] | None
, default:None
) –graph nodes.
-
edges
(dict[str, list] | None
, default:None
) –graph edges.
-
roots
(set | None
, default:None
) –graph roots.
Source code in arrlio/models.py
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 |
|
add_node
Add node to the graph.
Parameters:
-
node_id
(str
) –Node Id.
-
task
(Task | str
) –Task
or task name. -
root
(bool | None
, default:None
) –Is node the root of the graph.
Source code in arrlio/models.py
add_edge
Add edge to the graph. If routes are specified then only results with a matching route will be passed to the incoming node.
Parameters:
-
node_id_from
(str
) –Outgoing node.
-
node_id_to
(str
) –Incomming node.
-
routes
(str | list[str] | None
, default:None
) –Edge route.
Source code in arrlio/models.py
asdict
Convert to the dict.
Parameters:
-
sanitize
(bool | None
, default:None
) –flag to sanitize sensitive data.
Returns:
-
dict
–Graph
asdict
.
Source code in arrlio/models.py
from_dict
classmethod
Create Graph
from dict
.
Parameters:
-
data
(dict
) –Data as dictionary object.
Returns:
-
Graph
–Graph
object.
Source code in arrlio/models.py
arrlio.core
App
Arrlio application.
Parameters:
-
config
(Config
) –Arrlio application
Config
.
Source code in arrlio/core.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 |
|
init
async
Init application and plugins.
Source code in arrlio/core.py
close
async
Close application.
Source code in arrlio/core.py
send_task
async
send_task(
task: Task | str,
args: Args | None = None,
kwds: Kwds | None = None,
headers: dict | None = None,
**kwargs: dict,
) -> AsyncResult
Send task.
Parameters:
-
task
(Task | str
) –Task
or task name. -
args
(Args | None
, default:None
) –Task positional arguments.
-
kwds
(Kwds | None
, default:None
) –Task keyword arguments.
-
headers
(dict | None
, default:None
) –Task
headers argument. -
kwargs
(dict
, default:{}
) –Other
Task
arguments.
Returns:
-
AsyncResult
–Task
AsyncResult
.
Source code in arrlio/core.py
send_event
async
pop_result
async
Pop result for provided TaskInstance
.
Parameters:
-
task_instance
(TaskInstance
) –Task instance.
Yields:
-
AsyncGenerator[TaskResult, None]
–Task result.
Source code in arrlio/core.py
consume_tasks
async
Consume tasks from the queues.
Parameters:
-
queues
(list[str] | None
, default:None
) –List of queue names to consume.
Source code in arrlio/core.py
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 |
|
stop_consume_tasks
async
Stop consuming tasks.
Parameters:
-
queues
(list[str] | None
, default:None
) –List of queue names to stop consume.
Source code in arrlio/core.py
execute_task
async
Execute the TaskInstance
locally by the executor.
Parameters:
-
task_instance
(TaskInstance
) –Task instance to execute.
Yields:
-
AsyncGenerator[TaskResult, None]
–Task result.
Source code in arrlio/core.py
consume_events
async
consume_events(
callback_id: str,
callback: Callable[[Event], Any],
event_types: list[str] | None = None,
)
Consume events and invoke callback
on Event
received.
Parameters:
-
callback_id
(str
) –Callback Id. Needed for later use when stop consuming.
-
callback
(Callable[[Event], Any]
) –Callback to invoke then event received by backend.
-
event_types
(list[str] | None
, default:None
) –List of event types to consume.
Source code in arrlio/core.py
stop_consume_events
async
Stop consuming events.
Parameters:
-
callback_id
(str | None
, default:None
) –Callback Id for wich to stop consuming events.
Source code in arrlio/core.py
send_graph
AsyncResult
Source code in arrlio/core.py
515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 |
|
get
async
Get task result. Blocking until the task result available.
Returns:
-
Any
–Task result. For generator or asyncgenerator return the last available result.
Source code in arrlio/core.py
task
task(
func: FunctionType | MethodType | Type | None = None,
name: str | None = None,
base: Type[Task] | None = None,
**kwds,
)
Task decorator.
Parameters:
-
func
(FunctionType | MethodType | Type | None
, default:None
) –Task function.
-
name
(str | None
, default:None
) –Task name.
-
base
(Type[Task] | None
, default:None
) –Task base class.
-
kwds
–Task
arguments.
Source code in arrlio/core.py
arrlio.executor
Config
Executor
Task executor.
Parameters:
-
config
(Config
) –Executor config.
Source code in arrlio/executor.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
|
__call__
async
Execute TaskInstance
. Blocking until the task result available.
Parameters:
-
task_instance
(TaskInstance
) –Task instance to execute.
Yields:
-
AsyncGenerator[TaskResult, None]
–Task result.
Source code in arrlio/executor.py
execute
async
Execute TaskInstance
in the same thread. Blocking until the task result available.
Parameters:
-
task_instance
(TaskInstance
) –Task instance to execute.
Yields:
-
AsyncGenerator[TaskResult, None]
–Task result.
Source code in arrlio/executor.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
|
execute_in_thread
async
Execute TaskInstance
in the separate thread. Blocking until the task result available.
Parameters:
-
task_instance
(TaskInstance
) –Task instance to execute.
Yields:
-
AsyncGenerator[TaskResult, None]
–Task result.
Source code in arrlio/executor.py
arrlio.backends.rabbitmq
PUSH_RETRY_TIMEOUTS
module-attribute
Push operation retry timeouts(sequence) in seconds.
ReplyToMode
Bases: StrEnum
RabbitMQ reply_to mode.
Source code in arrlio/backends/rabbitmq.py
connection_factory
Connection factory.
Parameters:
-
url
(SecretAmqpDsn | list[SecretAmqpDsn]
) –RabbitMQ URL or list of URLs.
Returns:
-
Connection
–Connection
instance.
Source code in arrlio/backends/rabbitmq.py
arrlio.backends.brokers.rabbitmq
Config
Bases: BaseSettings
RabbitMQ Broker
config.
Attributes:
-
id
(str
) – -
url
(SecretAmqpDsn | list[SecretAmqpDsn]
) – -
timeout
(Optional[Timeout]
) –Network operation timeout in seconds. Default.
-
push_retry_timeouts
(Optional[list[Timeout]]
) –Push operation retry timeouts(sequence of seconds). Default.
-
pull_retry_timeouts
(Optional[list[Timeout]]
) –Pull operation retry timeout in seconds. Default.
-
serializer
(SerializerConfig
) –Config for Serializer.
-
exchange
(str
) –Exchange name. Default.
-
exchange_durable
(bool
) –Exchange durable option. Default.
-
queue_type
(QueueType
) –Tasks queue type. Default.
-
queue_durable
(bool
) –Queue durable option. Default.
-
queue_exclusive
(bool
) –Queue exclusive option. Default.
-
queue_auto_delete
(bool
) –Queue auto delete option. Default.
-
prefetch_count
(PositiveInt
) –Tasks prefetch count. Default.
Source code in arrlio/backends/brokers/rabbitmq.py
Broker
Bases: Closable
, AbstractBroker
RabbitMQ Broker
.
Parameters:
-
config
(Config
) –Broker
config.
Source code in arrlio/backends/brokers/rabbitmq.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
|
arrlio.backends.result_backends.rabbitmq
QUEUE_AUTO_DELETE
module-attribute
ResultBackend queue auto-delete
option.
Config
Bases: BaseSettings
RabbitMQ ResultBackend
config.
Attributes:
-
id
(str
) –ResultBackend
Id. -
url
(SecretAmqpDsn | list[SecretAmqpDsn]
) – -
timeout
(Optional[Timeout]
) –Network operation timeout in seconds. Default.
-
push_retry_timeouts
(Optional[list[Timeout]]
) –Push operation retry timeouts(sequence of seconds). Default.
-
pull_retry_timeouts
(Optional[list[Timeout]]
) –Pull operation retry timeout in seconds. Default.
-
serializer
(SerializerConfig
) –Config for Serializer.
-
reply_to_mode
(ReplyToMode
) –Reply to mode. Default.
-
exchange
(str
) –Exchange name. Default.
Only valid for
ReplyToMode.COMMON_QUEUE
. -
exchange_durable
(bool
) –Exchange durable option. Default.
Only valid for
ReplyToMode.COMMON_QUEUE
. -
queue_prefix
(str
) –Results queue prefix. Default.
Only valid for
ReplyToMode.COMMON_QUEUE
. -
queue_type
(QueueType
) –Events queue type. Default.
Only valid for
ReplyToMode.COMMON_QUEUE
. -
queue_durable
(bool
) –Queue durable option. Default.
Only valid for
ReplyToMode.COMMON_QUEUE
. -
queue_exclusive
(bool
) –Queue exclusive option. Default.
Only valid for
ReplyToMode.COMMON_QUEUE
. -
queue_auto_delete
(bool
) –Queue auto delete option. Default.
Only valid for
ReplyToMode.COMMON_QUEUE
. -
prefetch_count
(PositiveInt
) –Results prefetch count. Default.
Only valid for
ReplyToMode.COMMON_QUEUE
.
Source code in arrlio/backends/result_backends/rabbitmq.py
ResultBackend
Bases: Closable
, AbstractResultBackend
RabbitMQ ResultBackend
.
Parameters:
-
config
(Config
) –result backend config.
Source code in arrlio/backends/result_backends/rabbitmq.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 |
|
arrlio.backends.event_backends.rabbitmq
Config
Bases: BaseSettings
RabbitMQ EventBackend
config.
Attributes:
-
id
(str
) –EventBackend
Id. -
url
(SecretAmqpDsn | list[SecretAmqpDsn]
) – -
timeout
(Optional[Timeout]
) –Network operation timeout in seconds. Default.
-
push_retry_timeouts
(Optional[list[Timeout]]
) –Push operation retry timeouts(sequence of seconds). Default.
-
pull_retry_timeouts
(Optional[list[Timeout]]
) –Pull operation retry timeout in seconds. Default.
-
serializer
(SerializerConfig
) –Config for Serializer.
-
exchange
(str
) –Exchange name. Default.
-
exchange_durable
(bool
) –Exchange durable option. Default.
-
queue
(str
) –Events queue name. Default.
-
queue_type
(QueueType
) –Events queue type. Default.
-
queue_durable
(bool
) –Queue durable option. Default.
-
queue_exclusive
(bool
) –Queue exclusive option. Default.
-
queue_auto_delete
(bool
) –Queue auto delete option. Default.
-
prefetch_count
(PositiveInt
) –Events prefetch count. Default.
Source code in arrlio/backends/event_backends/rabbitmq.py
EventBackend
Bases: Closable
, AbstractEventBackend
RabbitMQ EventBackend
.
Parameters:
-
config
(Config
) –RabbitMQ
EventBackend
config.
Source code in arrlio/backends/event_backends/rabbitmq.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
|