Commit graph

42230 commits

Author SHA1 Message Date
Ritwik Puri
76c3cd3f9c
Merge pull request #21246 from phot0n/minor-fixes-email
fix: minor fixes email
2023-06-08 16:30:36 +05:30
phot0n
129fdc803a chore: fix linter 2023-06-08 16:20:10 +05:30
phot0n
4ceafe14e3 chore: remove unused is_background_task and add_to_sent_list -> update_recipient_status_to_sent
* set status to be hidden in queue doc
* don't maintain a list of sent to recipeint, a boolean is enough to set the status to partially sent
2023-06-08 16:19:37 +05:30
phot0n
aac74726ff chore: add recipient to sent list regardless of email sending method 2023-06-08 16:19:37 +05:30
phot0n
df7afa93b8 chore: log traceback directly to the queue doc 2023-06-08 16:19:37 +05:30
phot0n
742a6082ac fix: remove unnecessary statuses from email queue and only append emails to sent if imap is enabled 2023-06-08 16:19:37 +05:30
phot0n
2b22556309 chore: remove deprecated send method from smtp 2023-06-08 16:19:37 +05:30
Vishal Kumar
a21412e12a
feat: allow no_smtp_authentication to be set from site config (#21274) 2023-06-08 13:15:43 +05:30
Ritwik Puri
3446ca9155
fix: consider default value for content in update_workspace2 patch (#21258) 2023-06-08 13:14:37 +05:30
Ankush Menat
39374f3906 chore: ignore redis.cache commit
[skip ci]
2023-06-08 11:48:06 +05:30
Ankush Menat
fa6dc03cc8
refactor: frappe.cache() usage to frappe.cache (#21282) 2023-06-08 11:47:17 +05:30
Sagar Vora
b6669bb56e
perf: remove localproxy for frappe.cache (#21281)
* perf: remove localproxy for `frappe.cache`

* chore: fix type hints
2023-06-08 10:21:45 +05:30
Ankush Menat
40b3cd82bc
feat!: frappe.cache() -> frappe.cache (#21279)
This is more intuitive and consistent with other things like `frappe.db`.

PS: This is quite likely to break some weird usage which I can't guess right now. Normal usage inside request/job cycles will continue to work as it used to.
2023-06-07 22:47:45 +05:30
Ankush Menat
2cb2934f96
perf: query queued_recipients only once (#21277)
O(N) -> O(1) check for queued recipients

Caused by https://github.com/frappe/frappe/pull/18044

Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
2023-06-07 18:05:06 +05:30
Daizy Modi
984963d75e
chore: remove unused get_docname (#21270) 2023-06-07 13:56:50 +05:30
Shariq Ansari
226cebe3b4
Merge pull request #21265 from shariquerik/workflow-builder-breadcrumbs 2023-06-07 13:01:16 +05:30
Shariq Ansari
1607eb9ef3 fix: added breadcrumbs on workflow builder page 2023-06-07 09:57:43 +05:30
Ritwik Puri
094b8589f7
chore: add skipped in list view for patch log (#21264) 2023-06-07 00:01:52 +05:30
Ankush Menat
34ee6a1677
fix: declare the function (#21261)
[skip ci]
2023-06-06 16:11:02 +05:30
Shariq Ansari
c515b29c5e
Merge pull request #21252 from shariquerik/workspace-content-duplicating-fix
fix: avoid loading workspace content if already loaded
2023-06-06 09:11:53 +05:30
Shariq Ansari
f6cad90304
Merge branch 'develop' into workspace-content-duplicating-fix 2023-06-06 08:07:44 +05:30
Shariq Ansari
4f459f7146 fix(unrelated): make create doctype using form builder default button 2023-06-06 08:07:01 +05:30
Ankush Menat
90fd748592
fix(UX): Notify if newly created user has no roles (#21251)
- System user with no role is useless
- By default adding a new system user doesn't give them ANY role so
they can't really access desk even if they have system user role.
2023-06-05 22:27:01 +05:30
Shariq Ansari
4506a91380
Merge pull request #21245 from shariquerik/small-text-url-fix 2023-06-05 22:23:58 +05:30
Shariq Ansari
42ead7dc91
Merge branch 'develop' into workspace-content-duplicating-fix 2023-06-05 22:17:27 +05:30
Shariq Ansari
ba9e2aab17 fix: avoid loading workspace content if already loaded 2023-06-05 22:11:42 +05:30
Shariq Ansari
bda86629ee
Merge branch 'develop' into small-text-url-fix 2023-06-05 19:17:20 +05:30
Suraj Shetty
e5524ba477
Merge pull request #16561 from alyf-de/map-read-only 2023-06-05 17:57:02 +05:30
Shariq Ansari
2358bd8fc1 fix: changed for section with features and testimonial web temlates 2023-06-05 15:18:06 +05:30
Shariq Ansari
64613fec48 fix: changed section with card url field to small text 2023-06-05 15:11:46 +05:30
gn306029
54fabab010
fix: currency formatter got incorrect format when use precision 0 (#21239)
* fix: currency formatter got incorrect format when use precision 0

* Revert "fix: currency formatter got incorrect format when use precision 0"

This reverts commit 1919cf4763b16e0cca2c2596223443d901e00e27.

* fix: allow 0 as default precision

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-06-05 12:34:17 +05:30
Ankush Menat
a7413fe4a7 chore: separate out func call key for @redis_cache 2023-06-04 15:13:39 +05:30
Ankush Menat
392a506a76 perf: Cache published web forms 2023-06-04 15:13:39 +05:30
Ankush Menat
c94c0591c3 perf: cache dynamic web pages 2023-06-04 15:13:39 +05:30
Ankush Menat
7c7c11b454 perf: Cache web view routes
Each call to evaluate if route is web view makes N queries where N = #
of web view doctypes. This entire computation can be definitely cached
for short duration.

- Added cache bursting in WebsiteGenerator doctype updates.
- Added 60 minutes TTL in case cache invalidation wasn't done reliably.
2023-06-04 15:13:39 +05:30
Ankush Menat
e30b823eeb fix!: Webhook naming should be prompt 2023-06-04 10:46:38 +05:30
Suraj Shetty
f0df450c6f
Merge pull request #21224 from surajshetty3416/fix-safe-eval 2023-06-04 09:24:10 +05:30
Suraj Shetty
65a2cdcffc fix(safe_eval): Normalize code passed before validating the code 2023-06-04 08:59:08 +05:30
Ankush Menat
26722b1a1c fix: ignore ConnectionError in frappe.cache().exists() 2023-06-03 22:53:10 +05:30
Ankush Menat
0d056a3a2b test: fix broken tests
Fixture test:
This is broken cause it's trying to find doctype after it has been
deleted (wut?)
It was working so far because cache wasn't cleared correctly so you'd
still find it from cache.

db.set_value test:
converted to use last query instead of patching SQL
2023-06-03 22:53:10 +05:30
Ankush Menat
84ef2cc89c fix: reliable cache clearing for doctype
reclear cache after commit to prevent stale caching.
2023-06-03 22:53:10 +05:30
Ankush Menat
7d50ef19d3 perf: Delete multiple keys in O(1) redis calls
Currently we call redis for each key, redis already supports deleting
multiple keys in one go.
2023-06-03 22:53:10 +05:30
Ankush Menat
4193a251a5 fix: Invalidate cache on rollback too
Steps:
    - Document modified
    - Document refetched from cache
    - Transaction rolled back
    - Cache now contains unmodified changes.
2023-06-03 22:53:10 +05:30
Ankush Menat
98b4693dcf perf: finer cache eviction on db.set_value
Instead of nuking everything, just clear matching prefix
2023-06-03 22:53:10 +05:30
Ankush Menat
356a2587e2 refactor: Use plain keys instead of hashes for caching
- Hashes are supposed to be used for representing complex object, not
  multiple documents of same DocType.
- Redis's auto cache clearing wont clear individual key from hashes even if they
  are rarely used.
- Keys can have expiry.
2023-06-03 22:53:10 +05:30
Ankush Menat
106ff1f1ee fix: move cache clearing away from document
Passing lambda function from inside document object would keep reference
to document alive. This means increasing memeory usage in bulk
processing.

Refer https://github.com/frappe/frappe/pull/17061 for example

This also extends it to db.set_value
2023-06-03 22:53:10 +05:30
Ankush Menat
be1da0dd00 chore: remove duplicate cache clearing 2023-06-03 22:53:10 +05:30
Ankush Menat
339cbf208c fix: Cache clearing implementation 2023-06-03 22:53:10 +05:30
Ankush Menat
6717b07ab9 perf(customize_form): rebuild global search in bg 2023-06-03 22:28:35 +05:30
Ankush Menat
07e1d34568 refactor: RQ enqueue after commit and tests 2023-06-03 18:44:19 +05:30