seitime-frappe/frappe/utils
Ankush Menat 70e56b2e14
perf: Selectively switch to LIFO ordering when queue is starved (#32226)
When queue is overloaded every job gets delayed by size of the queue,
this means even interactive jobs like prepared reports face significant
wait times.

This flag allows developer to selectively enable LIFO on such jobs where
ordering doesn't matter. Any time we observe queue to be too large,
we'll insert the job at front so it gets highest priority.

This is a common strategy to deal with queue starvation, we are only
applying it explicitly because job execution order matters for
correctness in some cases.
2025-04-23 11:54:21 +05:30
..
__init__.py Merge pull request #32082 from sagarvora/cached-prop 2025-04-11 13:49:49 +05:30
background_jobs.py perf: Selectively switch to LIFO ordering when queue is starved (#32226) 2025-04-23 11:54:21 +05:30
backups.py refactor: use a database file directly, instead of an SQL file 2025-04-15 13:59:16 +05:30
bench_helper.py fix: always print tracebacks (#28838) 2024-12-19 12:46:11 +00:00
boilerplate.py fix(boilerplate): update mariadb in ci 2025-04-16 13:58:24 +05:30
caching.py perf: faster retrieval from site cache 2025-03-16 12:35:37 +05:30
change_log.py Merge pull request #31602 from dhiashalabi/fix/update-popup-msg-format 2025-03-10 14:51:15 +05:30
commands.py style: re-format with ruff 2024-02-05 18:53:33 +05:30
connections.py fix(check_database): add sqlite support 2025-04-15 13:59:16 +05:30
csvutils.py feat(csvutils): make sniffer usage optional 2025-01-15 10:58:41 +05:30
dashboard.py fix: ruff fixes 2024-02-07 17:04:31 +05:30
data.py Merge pull request #31255 from Sanket322/encode_filters 2025-03-15 00:35:38 +05:30
dateutils.py feat!: enhance Language to become more of a Locale (#27178) 2024-09-21 16:02:58 +02:00
defaults.py refactor: fixup with ruff 0.8.1 2024-12-04 13:18:04 +05:30
deprecations.py devx: add deprecation dumpster (#27887) 2024-10-08 18:56:10 +02:00
diff.py fix!: Switch to creation as default sort order 2024-03-27 11:18:28 +05:30
doctor.py fix: check for running jobs before migrating (#31438) 2025-02-26 09:30:38 +00:00
error.py chore: Update raise_error_on_no_output documentation and example 2025-01-22 08:12:08 +00:00
file_lock.py refactor: simplify code 2024-02-06 13:02:45 +05:30
file_manager.py fix: Drop file_manager.download_file (#26575) 2024-05-27 19:30:48 +05:30
fixtures.py fix: added prefix none as default in export_fixtures (#24816) 2024-02-10 08:21:56 +00:00
formatters.py refactor: trim frappe.__init__ 2025-04-06 10:30:23 +05:30
frappecloud.py fix: granular status in system health report 2025-02-25 10:38:25 +05:30
global_search.py perf: 10000s of times faster global search (#32147) 2025-04-16 09:06:00 +05:30
goal.py fix!: improved filter validation in Engine.get_query 2023-05-31 14:16:52 +05:30
html_utils.py fix: add summary html element to acceptable_elements 2024-11-15 16:54:18 +05:30
identicon.py refactor: fixup with ruff 0.8.1 2024-12-04 13:18:04 +05:30
image.py fix: preserve exif data in optimized image (#27341) 2024-08-08 11:28:32 +02:00
install.py fix: Clear site test records log before running test 2025-04-15 18:28:21 +02:00
jinja.py Revert "fix: Always reset globals on cached templates (#30897)" (#30906) 2025-01-28 10:02:00 +00:00
jinja_globals.py chore: add include_icons jinja global 2024-06-11 20:03:15 +02:00
lazy_loader.py style: re-format with ruff 2024-02-05 18:53:33 +05:30
local.py fix: revert to simpler LocalProxy override 2025-03-22 10:26:09 +05:30
logger.py Testing Module (#28000) 2024-10-07 09:46:49 +02:00
make_random.py fix: support sqlite 2025-04-15 13:59:16 +05:30
messages.py refactor: split messages.py from init.py 2025-03-10 21:02:13 +05:30
modules.py refactor!: make room in the frappe.config namespace 2024-09-12 12:18:58 +02:00
momentjs.py style: format all python files using black (#16453) 2022-04-12 10:59:25 +05:30
nestedset.py fix: incorrect parameters in frappe.db.set_value call in after_rename method 2024-08-13 16:33:11 +05:30
number_format.py feat!: enhance Language to become more of a Locale (#27178) 2024-09-21 16:02:58 +02:00
oauth.py fix: Move on_session_creation hook after session is created 2025-03-05 11:27:21 +01:00
password.py fix(password): add sqlite compat 2025-04-15 13:59:16 +05:30
password_strength.py refactor(treewide): enable RUF rules 2024-02-21 16:20:28 +05:30
pdf.py fix: code changes as pdf_generator is now select field 2025-02-14 17:04:13 +05:30
print_format.py perf: Selectively switch to LIFO ordering when queue is starved (#32226) 2025-04-23 11:54:21 +05:30
print_utils.py chore: move get_print to print_utils.py 2025-03-08 11:40:31 +05:30
redis_queue.py refactor: permutate implementation to assert no functional change in preparation (#28160) 2024-10-18 02:40:06 +02:00
redis_wrapper.py fix: dont recheck healthy state after value is retrieved from client cache (#32099) 2025-04-12 18:16:02 +05:30
response.py fix: revert to simpler LocalProxy override 2025-03-22 10:26:09 +05:30
safe_exec.py Revert "perf!: faster frappedict getattr" 2025-03-12 18:35:33 +05:30
scheduler.py fix: procline crash (#31845) 2025-03-21 12:30:19 +05:30
sentry.py feat: Enable Sentry Sampling 2024-10-28 11:27:51 +01:00
synchronization.py refactor: fixup with ruff 0.8.1 2024-12-04 13:18:04 +05:30
telemetry.py perf: long-lived posthog threads (#31821) 2025-03-20 12:36:17 +05:30
testutils.py style: format all python files using black (#16453) 2022-04-12 10:59:25 +05:30
typing_validations.py perf: cache signature params instead of signature 2025-03-20 00:55:52 +05:30
user.py perf: use cached user and compile regex 2025-04-18 17:41:42 +05:30
verified_command.py refactor: hmac generation 2022-11-12 13:05:57 +05:30
weasyprint.py style: re-format with ruff 2024-02-05 18:53:33 +05:30
xlsxutils.py chore: format code using pre-commit 2025-04-16 15:22:43 +05:30