Skip to content

Commit

Permalink
Add missing property to sort requested tasks in scheduling
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Jul 22, 2024
1 parent 9ad012b commit 8c1bac6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dispatcher/backend/src/utils/scheduling.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
import logging
from typing import Any, Dict, List, Optional

import db.models as dbm
import sqlalchemy as sa
import sqlalchemy.orm as so
from sqlalchemy.dialects.postgresql import insert

import db.models as dbm
from common import getnow
from common.constants import (
ARTIFACTS_EXPIRATION,
Expand All @@ -28,6 +26,7 @@
from common.enum import Platform, SchedulePeriodicity, TaskStatus
from common.schemas.orms import RequestedTaskFullSchema
from db import count_from_stmt, dbsession
from sqlalchemy.dialects.postgresql import insert
from utils.offliners import expanded_config

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -320,6 +319,7 @@ def get_document(task: dbm.RequestedTask):
"priority": task.priority,
"worker": task.worker.name if task.worker else None,
"duration": get_duration_for_with_schedule(task.schedule, worker.name),
"updated_at": task.updated_at,
}

stmt = sa.select(dbm.RequestedTask)
Expand Down

0 comments on commit 8c1bac6

Please sign in to comment.