Skip to content

Commit

Permalink
(v2.16.11) - Improve task export performance
Browse files Browse the repository at this point in the history
  • Loading branch information
pritamrungta committed Mar 26, 2024
1 parent 18ef679 commit a6c72d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion redbrick/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from .config import config
from .version_check import version_check

__version__ = "2.16.10"
__version__ = "2.16.11"

# windows event loop close bug https://github.com/encode/httpx/issues/914#issuecomment-622586610
try:
Expand Down
16 changes: 12 additions & 4 deletions redbrick/repo/shards.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,17 @@
}
"""

TASK_SHARD = f"""
NORMAL_TASK_SHARD = """
... on LabelingTask {
state
assignedTo {
userId
email
}
}
"""

CONSENSUS_TASK_SHARD = f"""
... on LabelingTask {{
state
assignedTo {{
Expand Down Expand Up @@ -294,9 +304,7 @@ def task_shard(presigned_items: bool, with_consensus: bool) -> str:
dpId
currentStageName
priority
currentStageSubTask{"(consensus: true)" if with_consensus else ""} {{
{TASK_SHARD}
}}
{f"currentStageSubTask(consensus: true) {{ {CONSENSUS_TASK_SHARD} }}" if with_consensus else f"currentStageSubTask {{ {NORMAL_TASK_SHARD} }}"}
datapoint {{
{datapoint_shard(True, presigned_items)}
}}
Expand Down

0 comments on commit a6c72d1

Please sign in to comment.