Skip to content

Commit

Permalink
Working through this test, and debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
fatimarabab committed Jul 1, 2024
1 parent 1f0f28e commit c006b57
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions backend/src/core/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ def process_tasks(annotation_queue, genomic_unit_collection): # pylint: disable
) and annotation_unit.is_version_latest():
logger.info('%s Annotation Exists...', format_annotation_logging(annotation_unit))
latest = True
ready = True
print("Reaching check to check if annotation exists and if version is latest")
continue
ready = True
# ready = True
print("Surpassed check to check if annotation exists and if version is latest ")

if annotation_unit.has_dependencies():
Expand All @@ -111,7 +112,19 @@ def process_tasks(annotation_queue, genomic_unit_collection): # pylint: disable
)
ready = annotation_unit.ready_for_annotation(annotation_value, missing)

if not ready and not latest:
if not latest:
version_task = AnnotationTaskFactory.create_version_task(
annotation_unit.genomic_unit, annotation_unit.dataset
)
logger.info('%s Creating Task To Version...', format_annotation_logging(annotation_unit))
annotation_task_futures[executor.submit(version_task.annotate)
] = (annotation_unit.genomic_unit, version_task)

# annotation_queue.put(annotation_unit)

continue

if not ready:
print("Reaching check to check if annotation unit is not ready and not latest")
if annotation_unit.should_continue_annotation():
logger.info(
Expand All @@ -127,14 +140,6 @@ def process_tasks(annotation_queue, genomic_unit_collection): # pylint: disable

continue

if not latest:
version_task = AnnotationTaskFactory.create_version_task(
annotation_unit.genomic_unit, annotation_unit.dataset
)
logger.info('%s Creating Task To Version...', format_annotation_logging(annotation_unit))
annotation_task_futures[executor.submit(version_task.annotate)
] = (annotation_unit.genomic_unit, version_task)

task = AnnotationTaskFactory.create_annotation_task(
annotation_unit.genomic_unit, annotation_unit.dataset
)
Expand Down

0 comments on commit c006b57

Please sign in to comment.