Skip to content

Commit

Permalink
Do not set expiry time to huey collections
Browse files Browse the repository at this point in the history
Do not set expiry time to huey collections
  • Loading branch information
Leon0824 committed Jan 26, 2025
1 parent d0a8d30 commit b8cee75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "huey-mongodb"
version = "1.0.2"
version = "1.1.0"
description = "huey MongoDB backend"
authors = [{ name = "Leon", email = "[email protected]" }]
dependencies = ["huey>=2.5,<2.6", "pymongo>=4.9,<4.11"]
Expand Down
9 changes: 6 additions & 3 deletions src/huey_mongodb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@ def initialize_schema(self):
self.db.huey_schedule.create_index(
{"queue": 1, "timestamp": 1},
name='schedule_queue_timestamp',
unique=False, sparse=True, expireAfterSeconds=86400,
unique=False, sparse=True,
# expireAfterSeconds=86400,
)
self.db.huey_queue.create_index(
{"priority": -1, "_id": 1},
name='queue_priority_id',
unique=False, sparse=True, expireAfterSeconds=3600,
unique=False, sparse=True,
# expireAfterSeconds=3600,
)
self.db.huey_kv.create_index(
{"queue": 1, "key": 1},
name='kv_queue_key',
unique=True, sparse=True, expireAfterSeconds=3600,
unique=True, sparse=True,
# expireAfterSeconds=3600,
)


Expand Down

0 comments on commit b8cee75

Please sign in to comment.