Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 5 #6

Merged
merged 2 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: \.(min\.css|min\.js|po|mo|txt)$
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-isort
rev: "v5.10.1"
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: "6.0.0"
rev: "7.0.0"
hooks:
- id: flake8
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Fixed

## [0.1.2] - 2024-05-08

### Changed

- Refactored SQL in remove_item() of sqlite engine to address potential compatibility issue (#5)

## [0.1.1] - 2023-06-09

### Changed
Expand Down
1 change: 1 addition & 0 deletions measurements/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Runs multiple producers and consumers in parallel and measures duration and throughput.
"""

import argparse
import asyncio
import csv
Expand Down
2 changes: 1 addition & 1 deletion src/aiodiskqueue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from aiodiskqueue.exceptions import QueueEmpty, QueueFull
from aiodiskqueue.queues import Queue

__version__ = "0.1.1"
__version__ = "0.1.2"


__all__ = ["engines", "Queue", "QueueEmpty", "QueueFull"]
1 change: 1 addition & 0 deletions src/aiodiskqueue/engines/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Queue storage engines."""

# flake8: noqa
from .dbm import DbmEngine

Expand Down
8 changes: 6 additions & 2 deletions src/aiodiskqueue/engines/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ async def remove_item(self):
await db.execute(
"""
DELETE FROM queue
ORDER BY rowid
LIMIT 1;
WHERE rowid IN (
SELECT rowid
FROM queue
ORDER BY rowid
LIMIT 1
);
"""
)
Loading