Skip to content

Commit

Permalink
fix: change status fix thresholds
Browse files Browse the repository at this point in the history
  • Loading branch information
18alantom committed Jun 26, 2024
1 parent 1ef0085 commit 8e95e9d
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions press/press/doctype/deploy_candidate/deploy_candidate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1791,15 +1791,26 @@ def get_duration(start_time: datetime, end_time: Optional[datetime] = None):
return float(value)


def check_builds_status():
fail_or_retry_stuck_builds()
correct_false_positives()
def check_builds_status(
last_n_days=0,
last_n_hours=4,
stuck_threshold_in_hours=2,
):
fail_or_retry_stuck_builds(
last_n_days=last_n_days,
last_n_hours=last_n_hours,
stuck_threshold_in_hours=stuck_threshold_in_hours,
)
correct_false_positives(
last_n_days=last_n_days,
last_n_hours=last_n_hours,
)
frappe.db.commit()


def fail_or_retry_stuck_builds(
last_n_days=0,
last_n_hours=1,
last_n_hours=4,
stuck_threshold_in_hours=2,
):
# Fails or retries builds builds from the `last_n_days` and `last_n_hours` that
Expand Down

0 comments on commit 8e95e9d

Please sign in to comment.