-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix Redis keys (temporary solution) * Fix unused variable (linter) * Fix double increment bug, remove deprecated key from test * Bump version: 1.23.0-rc34 → 1.23.0-rc35 * Execute redis commands at the end of mark_task_for_retry * Bump version: 1.23.0-rc35 → 1.23.0-rc36 * Remove wrong keys clean-up code * Fix failing tests
- Loading branch information
1 parent
83c62cb
commit 59629f1
Showing
5 changed files
with
89 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import logging | ||
|
||
__version__ = "1.23.0-rc34" | ||
__version__ = "1.23.0-rc36" | ||
|
||
logging.getLogger("boto3").setLevel(logging.WARNING) | ||
logging.getLogger("botocore").setLevel(logging.WARNING) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from unittest import TestCase | ||
|
||
|
||
from servicelayer.cache import get_fakeredis | ||
from servicelayer.taskqueue import ( | ||
Dataset, | ||
dataset_from_collection_id, | ||
) | ||
|
||
|
||
class TestDataset(TestCase): | ||
def setUp(self): | ||
self.connection = get_fakeredis() | ||
self.connection.flushdb() | ||
self.collection_id = 1 | ||
|
||
self.dataset = Dataset( | ||
conn=self.connection, name=dataset_from_collection_id(self.collection_id) | ||
) | ||
|
||
def test_get_active_datasets_key(self): | ||
assert self.dataset.key == "tq:qdatasets" | ||
|
||
def test_get_active_stages_key(self): | ||
assert ( | ||
self.dataset.active_stages_key | ||
== f"tq:qds:{self.collection_id}:active_stages" | ||
) | ||
|
||
def test_get_timestamp_keys(self): | ||
assert self.dataset.start_key == f"tq:qdj:{self.collection_id}:start" | ||
assert ( | ||
self.dataset.last_update_key == f"tq:qdj:{self.collection_id}:last_update" | ||
) | ||
|
||
def test_tasks_per_collection_keys(self): | ||
assert self.dataset.finished_key == f"tq:qdj:{self.collection_id}:finished" | ||
assert self.dataset.running_key == f"tq:qdj:{self.collection_id}:running" | ||
assert self.dataset.pending_key == f"tq:qdj:{self.collection_id}:pending" |