perf: Selectively switch to LIFO ordering when queue is starved by ankush [frappe] PR#32226
From: https://github.com/frappe/frappe/pull/32226
Date: 2025-04-23 11:54:21+05:30
- perf: Selectively switch to LIFO ordering when queue is starved (#32226)
Diagnostics
pre-commit failed for source commit: 70e56b2e145b160ac370cb23b23ee20b2c10b5bf
[WARNING] top-level `default_stages` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this.
frappe/model/workflow.py:122:15: RUF015 Prefer `next(...)` over single element slice
|
121 | # find settings for the next state
122 | next_state = [d for d in workflow.states if d.state == transition.next_state][0]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUF015
123 |
124 | # update any additional field
|
= help: Replace with `next(...)`
Found 1 error.
No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).
Checkout instructions
# Checkout locally
git fetch upstream
git switch ft-pr-32226
# Alternatively, re-take the changes
git switch develop
ft take ft-pr-32226
# Make changes then rebase
git rebase -i develop
# Fix or ignore conflicts
git checkout --theirs .
git rebase --continue
# Force-push changes
git push --force-with-lease