Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions pgmq_sqlalchemy/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@ async def create_queue_async(
commit: bool = True,
) -> None:
"""
.. _unlogged_table: https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-UNLOGGED
.. |unlogged_table| replace:: **UNLOGGED TABLE**

**Create a new queue.**

* if ``unlogged`` is ``True``, the queue will be created as an |unlogged_table|_ .
Expand Down Expand Up @@ -287,9 +284,6 @@ async def create_partitioned_queue_async(
) -> None:
"""Create a new **partitioned** queue.

.. _pgmq_partitioned_queue: https://github.com/tembo-io/pgmq?tab=readme-ov-file#partitioned-queues
.. |pgmq_partitioned_queue| replace:: **PGMQ: Partitioned Queues**

.. code-block:: python

# Numeric partitioning (by msg_id)
Expand Down Expand Up @@ -414,9 +408,6 @@ async def drop_queue_async(
) -> bool:
"""Drop a queue.

.. _drop_queue_method: ref:`pgmq_sqlalchemy.PGMQueue.drop_queue`
.. |drop_queue_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.drop_queue`

.. code-block:: python

await pgmq_client.drop_queue_async('my_queue')
Expand Down Expand Up @@ -700,12 +691,6 @@ async def read_async(
commit: bool = True,
) -> Optional[Message]:
"""
.. _for_update_skip_locked: https://www.postgresql.org/docs/current/sql-select.html#SQL-FOR-UPDATE-SHARE
.. |for_update_skip_locked| replace:: **FOR UPDATE SKIP LOCKED**

.. _read_method: ref:`pgmq_sqlalchemy.PGMQueue.read`
.. |read_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.read`

Read a message from the queue.

Returns:
Expand Down Expand Up @@ -929,10 +914,6 @@ async def read_with_poll_async(
) -> Optional[List[Message]]:
"""

.. _read_with_poll_method: ref:`pgmq_sqlalchemy.PGMQueue.read_with_poll`
.. |read_with_poll_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.read_with_poll`


| Read messages from a queue with long-polling.
|
| When the queue is empty, the function block at most ``max_poll_seconds`` seconds.
Expand Down Expand Up @@ -1074,9 +1055,6 @@ async def set_vt_async(
commit: bool = True,
) -> Optional[Message]:
"""
.. _set_vt_method: ref:`pgmq_sqlalchemy.PGMQueue.set_vt`
.. |set_vt_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.set_vt`

Set the visibility timeout for a message.

Args:
Expand Down Expand Up @@ -1231,9 +1209,6 @@ async def delete_async(
"""
Delete a message from the queue.

.. _delete_method: ref:`pgmq_sqlalchemy.PGMQueue.delete`
.. |delete_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.delete`

* Raises an error if the ``queue_name`` does not exist.
* Returns ``True`` if the message is deleted successfully.
* If the message does not exist, returns ``False``.
Expand Down Expand Up @@ -1296,9 +1271,6 @@ async def delete_batch_async(
"""
Delete a batch of messages from the queue.

.. _delete_batch_method: ref:`pgmq_sqlalchemy.PGMQueue.delete_batch`
.. |delete_batch_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.delete_batch`

.. note::
| Instead of return `bool` like |delete_method|_,
| |delete_batch_method|_ will return a list of ``msg_id`` that are successfully deleted.
Expand Down Expand Up @@ -1364,10 +1336,6 @@ async def archive_async(
"""
Archive a message from a queue.

.. _archive_method: ref:`pgmq_sqlalchemy.PGMQueue.archive`
.. |archive_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.archive`


* Message will be deleted from the queue and moved to the archive table.
* Will be deleted from ``pgmq.q_<queue_name>`` and be inserted into the ``pgmq.a_<queue_name>`` table.
* raises an error if the ``queue_name`` does not exist.
Expand Down Expand Up @@ -1614,12 +1582,6 @@ async def metrics_all_async(
) -> Optional[List[QueueMetrics]]:
"""

.. _read_committed_isolation_level: https://www.postgresql.org/docs/current/transaction-iso.html#XACT-READ-COMMITTED
.. |read_committed_isolation_level| replace:: **READ COMMITTED**

.. _metrics_all_method: ref:`pgmq_sqlalchemy.PGMQueue.metrics_all`
.. |metrics_all_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.metrics_all`

Get metrics for all queues.

Returns:
Expand Down