Skip to content
Open
14 changes: 6 additions & 8 deletions backend/backend/core/scheduler/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@



def _compute_next_run_time(periodic, last_run_at):
def _compute_next_run_time(periodic):
"""Derive the next run time from a PeriodicTask's schedule."""
if not periodic or not periodic.enabled:
return None
try:
schedule = periodic.schedule
reference = last_run_at or periodic.last_run_at or timezone.now()
remaining = schedule.remaining_estimate(reference)
return timezone.now() + remaining
now = timezone.now()
remaining = schedule.remaining_estimate(now)
return now + remaining
except Exception:
logger.debug("Failed to compute next_run_time for %s", periodic, exc_info=True)
logger.warning("Failed to compute next_run_time for %s", periodic, exc_info=True)
return None
Comment thread
greptile-apps[bot] marked this conversation as resolved.


Expand Down Expand Up @@ -181,9 +181,7 @@ def _serialize_task(task):
"task_status": task.status,
"task_run_time": task.task_run_time,
"task_completion_time": task.task_completion_time,
"next_run_time": task.next_run_time or _compute_next_run_time(
periodic, task.task_run_time
),
"next_run_time": _compute_next_run_time(periodic) or task.next_run_time,
"task_type": task_type,
"description": task.description,
"environment": {
Expand Down
49 changes: 49 additions & 0 deletions frontend/src/ide/scheduler/JobDeploy.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,55 @@
font-weight: bold;
}

/* ── Job List Table ── */
.jl-job-name {
display: flex;
align-items: center;
gap: 8px;
}

.jl-job-icon {
width: 30px;
height: 30px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
font-size: 16px;
}

.jl-job-icon.success {
background: rgba(82, 196, 26, 0.12);
color: var(--success-color, #52c41a);
}

.jl-job-icon.failed {
background: rgba(255, 77, 79, 0.12);
color: var(--error-color, #ff4d4f);
}

.jl-job-icon.running {
background: rgba(22, 119, 255, 0.12);
color: var(--primary-color, #1677ff);
animation: jl-pulse 2s infinite;
}

.jl-job-icon.paused {
background: rgba(140, 140, 140, 0.12);
color: var(--font-color-3, #8c8c8c);
}

@keyframes jl-pulse {
0%,
100% {
box-shadow: 0 0 0 0 rgba(22, 119, 255, 0.4);
}
50% {
box-shadow: 0 0 0 6px rgba(22, 119, 255, 0);
}
}

.job-deploy-header-field {
width: 200px;
}
Expand Down
Loading
Loading