Skip to content

Router

flowtask.components.NetworkNinja.router

EmptyQueue

Bases: BaseException

Exception raised when the Queue is empty.

Attributes:

Name Type Description
Example
NetworkNinja

comment: Download Batch from NetworkNinja. action: get_batch avoid_acceptance: true

NetworkNinja

NetworkNinja(loop=None, job=None, stat=None, **kwargs)

Bases: HTTPService, FlowComponent

NetworkNinja.

Overview: Router for processing NetworkNinja Payloads.
Properties

+---------------+----------+------------------------------------------+ | Name | Required | Description | +---------------+----------+------------------------------------------+ | action | Yes | Type of operation (get_batch, etc) | +---------------+----------+------------------------------------------+ | credentials | No | API credentials (taken from config) | +---------------+----------+------------------------------------------+ | payload | No | Additional payload parameters | +---------------+----------+------------------------------------------+

Supported Types
  • get_batch: Retrieves batch acceptance data

get_batch async

get_batch()

Handle get_batch operation type

Uses to download a Batch from NetworkNinja SQS Queue.

get_multi_batches async

get_multi_batches()

Get Multiples batches at once.

report_batch async

report_batch(batch_id, report_code=200)

Handle report_batch operation type

Uses to report a Batch to NetworkNinja SQS Queue.

run async

run()

Run NetworkNinja Router.