minos.plugins.aiopg.factories.networks.collections.queues

Classes

AiopgBrokerQueueDatabaseOperationFactory

Aiopg Broker Queue Database Operation Factory class.

class AiopgBrokerQueueDatabaseOperationFactory[source]

Bases: BrokerQueueDatabaseOperationFactory, ABC

Aiopg Broker Queue Database Operation Factory class.

abstract build_table_name()[source]

Get the table name.

Returns

A str value.

Return type

str

build_create()[source]

Build the “create table” query.

Returns

A SQL instance.

Return type

DatabaseOperation

build_mark_processed(id_)[source]

Build the “update not processed” query.

Returns

A SQL instance.

Parameters

id_ (int) –

Return type

DatabaseOperation

build_delete(id_)[source]

Build the “delete processed” query.

Returns

A SQL instance.

Parameters

id_ (int) –

Return type

DatabaseOperation

build_mark_processing(ids)[source]
Returns

A SQL instance.

Parameters

ids (Iterable[int]) –

Return type

DatabaseOperation

build_count(retry, *args, **kwargs)[source]

Build the “count not processed” query.

Returns

Parameters

retry (int) –

Return type

DatabaseOperation

build_submit(topic, data)[source]

Build the “insert” query.

Returns

A SQL instance.

Parameters
Return type

DatabaseOperation

build_query(retry, records, *args, **kwargs)[source]

Build the “select not processed” query.

Returns

A SQL instance.

Parameters
  • retry (int) –

  • records (int) –

Return type

DatabaseOperation