Skip to content
Open
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "sergeant"
version = "0.26.0"
version = "0.27.0"
readme = "README.md"
homepage = "https://github.com/Intsights/sergeant"
repository = "https://github.com/Intsights/sergeant"
Expand Down
4 changes: 2 additions & 2 deletions sergeant/connector/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def queue_push(
priority: str = 'NORMAL',
consumable_from: typing.Optional[float] = None,
) -> bool:
if consumable_from is not None:
if consumable_from:
priority_value = consumable_from
elif priority == 'HIGH':
priority_value = 0.0
Expand Down Expand Up @@ -341,7 +341,7 @@ def queue_push_bulk(
priority: str = 'NORMAL',
consumable_from: typing.Optional[float] = None,
) -> bool:
if consumable_from is not None:
if consumable_from:
priority_value = consumable_from
elif priority == 'HIGH':
priority_value = 0.0
Expand Down
4 changes: 2 additions & 2 deletions sergeant/connector/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def queue_push(
priority: str = 'NORMAL',
consumable_from: typing.Optional[float] = None,
) -> bool:
if consumable_from is not None:
if consumable_from:
priority_value = consumable_from
elif priority == 'HIGH':
priority_value = 0.0
Expand All @@ -382,7 +382,7 @@ def queue_push_bulk(
priority: str = 'NORMAL',
consumable_from: typing.Optional[float] = None,
) -> bool:
if consumable_from is not None:
if consumable_from:
priority_value = consumable_from
elif priority == 'HIGH':
priority_value = 0.0
Expand Down
4 changes: 2 additions & 2 deletions sergeant/connector/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def queue_push(
priority: str = 'NORMAL',
consumable_from: typing.Optional[float] = None,
) -> bool:
if consumable_from is None:
if not consumable_from:
if priority == 'HIGH':
return self.next_connection.lpush(queue_name, item) > 0
else:
Expand All @@ -333,7 +333,7 @@ def queue_push_bulk(
priority: str = 'NORMAL',
consumable_from: typing.Optional[float] = None,
) -> bool:
if consumable_from is None:
if not consumable_from:
if priority == 'HIGH':
return self.next_connection.lpush(queue_name, *items) > 0
else:
Expand Down