Commit graph

3376 commits

Author SHA1 Message Date
Revant Nandgaonkar
e9ece3b283 feat: connect to redis sentinel for redis queue 2024-03-18 06:10:31 +00:00
Ankush Menat
b7a5884344 perf: import sentinal locally 2024-03-15 11:31:04 +05:30
Ankush Menat
0d6ec13b0b perf: preload modules in worker pool 2024-03-15 11:23:04 +05:30
Ankush Menat
322671766d perf: avoid importing posthog if not required
Avoids 7MB of overhead and cleanup costs for each background job 🎉
2024-03-15 10:51:17 +05:30
Revant Nandgaonkar
77618cde1f
feat: connect to redis sentinel for redis cache (#25398) 2024-03-14 13:54:46 +05:30
Akhil Narang
3f524be635
fix(json_handler): handle uuid.UUID
Resolves #25242

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 17:27:30 +05:30
Akhil Narang
6a5af14049
fix: unsubscribe from task after completion
Also update event name to be more logical

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
0ec3e4a683
refactor: add in a new endpoint for background printing
Let the original one stay as-is for backward compatibility

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
5e37ac740e
refactor(bulk_print): choose queue dynamically
Update docstrings and type hints a bit

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
508e4d9ae3
fix: make filename more user-friendly
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
5a6bff9de7
fix: let backend generate task ID
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
9bf22b79e4
fix: update message
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
bf6cb1a49f
feat: move bulk print operation to the background
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Ankush Menat
8bbb69a883
fix: Prevent multiple schedulers from running on same bench (#25340) 2024-03-11 14:12:31 +00:00
barredterra
5558cb0739 fix: linter config in boilerplate 2024-03-10 20:43:39 +01:00
Ankush Menat
010de19ac4
Merge branch 'develop' into update-invalid-encryption-key-message 2024-03-10 12:51:22 +05:30
Ankush Menat
05dca169e3 fix: delete doctype cache before starting migration 2024-03-10 12:34:57 +05:30
Akhil Narang
1032d9b4da
chore: include a link to FC docs regarding what to do with encryption key for restored sites
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-07 12:12:05 +05:30
Ankush Menat
ebd47429a5 chore: grammar?
This looks weird without fullstop when there are suggestions
2024-03-04 16:32:48 +05:30
Ankush Menat
ef5a173db0
fix: misleading CLI error message for missing command (#25049) 2024-03-04 10:45:46 +00:00
Suraj Shetty
b398377739
Merge branch 'develop' into fix-email-validation 2024-03-02 21:23:24 +05:30
Suraj Shetty
ec4261bd77 fix: Do not check for email validation on empty string 2024-03-02 21:20:51 +05:30
Maxim Sysoev
eff50e1cd3
fix: filter Implementation is set operator (#25182)
* Implementation is set operator. fix issue #25180

* Refactored filtrer operator `is`,
Add tests

* fix: Correct implementation for `is set`

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2024-03-02 13:59:30 +00:00
Ankush Menat
f7bff58935
fix: use name for RQ worker instead of PID (#25175)
Also avoid complex naming schemes.
2024-02-29 14:38:48 +00:00
Akhil Narang
16489b342b
Merge pull request #25125 from akhilnarang/bg-job-docstring
refactor: update docstring and typehints for functions
2024-02-28 11:30:43 +05:30
Akhil Narang
1ca98566d4
fix(background_jobs): update type hint and docstring
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-27 12:20:13 +05:30
Corentin Flr
0934dfea93
fix(formatters): Translate Select value in format_value (#24951) 2024-02-26 21:05:44 +05:30
Ankush Menat
a19fd6a8b9
fix: Don't init site if already init-ed during truncate (#25033) 2024-02-23 11:37:38 +00:00
Akhil Narang
bf12be6928
fix: 755 -> 644
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-23 16:54:10 +05:30
Akhil Narang
3f1e19de85
refactor(treewide): enable RUF rules
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-21 16:20:28 +05:30
Ankush Menat
718b5b8bee
fix: Private images in PDFs from background jobs (#24980)
* refactor: Private images rendering in PDFs

Private images currently render fine if PDF is generated during a
request as we pass the cookiejar to WKHTML.

Background jobs however fail completeley because they can't retrieve
private images without cookiejar.

This PR converts all image types to base64 encoded sources in HTML
itself, so wkhtmltopdf doesn't have to a fire a request.

* test: private images in pdf
2024-02-21 10:38:02 +00:00
Akhil Narang
648828c3b5
fix(redis_wrapper): handle redis not being connected during cache clearing
Ignore the redis connection errors, we can still proceed here

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-21 11:26:57 +05:30
Akhil Narang
5343bcb756
fix(redis_wrapper/hdel): don't pipeline if we can avoid it
For a single deletion it doesn't make much sense, so just directly delete and return

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-19 14:28:35 +05:30
Akhil Narang
94365a59bf
chore(utils/caching): drop unnecessary indent
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-19 14:28:35 +05:30
Akhil Narang
7c82115f5b
refactor(redis): DEL -> UNLINK
This is beneficial since unlink is non blocking, it will run in a different thread if the data passed is large
https://redis.io/commands/unlink/

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-19 14:28:35 +05:30
Akhil Narang
762290db9a
chore: don't delete keys that aren't used
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-19 14:28:35 +05:30
Akhil Narang
aa38d9e2f4
refactor: pipeline wherever possible, optimize calls
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-19 14:28:35 +05:30
Ankush Menat
e6120f230a
Merge pull request #23848 from barredterra/copy-config-to-new-app
feat: default configuration for new app
2024-02-19 12:19:07 +05:30
Ankush Menat
beb75ef66e
Merge pull request #24919 from scdanieli/fix-has-value-changed
fix: ensure has_value_changed works for Datetime, Date and Time fields
2024-02-19 10:54:45 +05:30
barredterra
d67066dfae fix: switch to ruff 2024-02-18 16:42:41 +01:00
barredterra
7e5dd21cba Merge remote-tracking branch 'upstream/develop' into copy-config-to-new-app 2024-02-18 16:30:00 +01:00
scdanieli
a1cb19c820 fix: ensure has_value_changed works for datetime, date and timedelta fields 2024-02-18 16:05:31 +01:00
Raffael Meyer
fc64e8a0fb
feat: pass doctype as context when translating label (#24903) 2024-02-18 19:42:15 +05:30
barredterra
1aae576b1a Merge branch 'develop' into copy-config-to-new-app 2024-02-16 14:36:58 +01:00
barredterra
30d63b165b refactor: split into multiple methods 2024-02-13 11:44:50 +01:00
barredterra
2a85c4c5d9 refactor: no inline if-statement
Co-authored-by: Akhil Narang <me@akhilnarang.dev>
2024-02-13 11:29:30 +01:00
barredterra
2e4dd1ba77 refactor: setup_backup_tables 2024-02-12 18:16:47 +01:00
Ankush Menat
4c925e0325 refactor: Reset password flow
- Hash one time reset tokens instead of storing them as is
- Up the perm level
- Use better source of randomness for generating token
- minor code cleanup here and there
2024-02-11 14:25:26 +05:30
Nihalroshan55
c21935ba9e
fix: added prefix none as default in export_fixtures (#24816)
* added prefix none as default in export_fixtures

* refactor: declare prefix default later later

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2024-02-10 08:21:56 +00:00
Raffael Meyer
b3b02c809f
Merge pull request #24684 from barredterra/label-in-link-to-form 2024-02-09 21:03:07 +01:00