Commit graph

42462 commits

Author SHA1 Message Date
Ankush Menat
d353662b53 fix: Session insert using system time
NOW() is server time not system time.
2023-06-28 17:47:22 +05:30
Ankush Menat
60efb7c2ff fix: incorrect session expiry datediff
Datediff doesn't work like this in MYSQL, mysql just treats the
timestamp as flat timestamp.
2023-06-28 17:47:22 +05:30
Ankush Menat
7c4009fde9 refactor: use QB 2023-06-28 17:47:22 +05:30
Ankush Menat
564b960678 fix: correct last update value
`NOW()` evalautes to server's time we should use system time instead.
2023-06-28 17:47:22 +05:30
Ankush Menat
95e49193c8
fix: dont retry if redis not available for realtime (#21517)
* fix: reduce retries for rq connection

10 seconds of retries when connection isn't available is too much, just
   failing might be beneficial.

- BusyLoadingError only occurs when redis is restarting
- ConnectionError mostly means redis is dead, no amount of retries will
  bring it back.

* fix: dont retry if redis is down for realtime
2023-06-28 15:21:04 +05:30
Maharshi Patel
814265d245
fix(minor): workflow state indicator (#21508)
In List view only `Status` type was considered for indicator. Added fields with `Workflow State` as options
2023-06-28 13:34:36 +05:30
mergify[bot]
2fa7f8350c
Merge pull request #21504 from frappe/fix-autoincrement-link-web-form
fix(WebForm): auto-increment link field
2023-06-28 06:48:45 +00:00
Hussain Nagaria
aaf1bd7f4b style: fix linter whitespace issue 2023-06-28 11:46:17 +05:30
Suraj Shetty
48db27676e
Merge pull request #21510 from surajshetty3416/remove-broken-image-mixin 2023-06-28 11:31:08 +05:30
Suraj Shetty
537d551112 refactor: Deprecate broken-img mixin 2023-06-28 11:17:17 +05:30
Ankush Menat
6f33506daa
Merge pull request #21509 from ankush/remove_error_snapshot_doctype
refactor!: Remove error snapshot doctype
2023-06-28 11:16:18 +05:30
Ankush Menat
37577b752e fix: log settings should delete delted doctypes
[skip ci]
2023-06-28 10:59:55 +05:30
Ankush Menat
ae8ee5064c refactor!: Remove error snapshot 2023-06-28 10:59:51 +05:30
Ankush Menat
b9f000e1f9 refactor!: Log 5xx error to error log instead of error snapshot
Also move log_error function to right location
2023-06-28 10:59:19 +05:30
Hussain Nagaria
b9bd055813 fix(WebForm): auto-increment link field 2023-06-27 17:10:46 +05:30
Suraj Shetty
92c24d9abb
Merge pull request #20877 from barredterra/file-permissions 2023-06-27 09:22:09 +05:30
Ankush Menat
e2c468df60
fix: set prepared report in background (#21485) 2023-06-26 19:56:04 +05:30
barredterra
4b046f0b11 refactor: use new_doc instead of get_doc 2023-06-26 15:53:15 +02:00
Ankush Menat
b294b30301
Merge pull request #21482 from ankush/rq_worker_start
feat: RQ WorkerPool support
2023-06-26 18:53:36 +05:30
barredterra
df27d021de Merge branch 'develop' into file-permissions 2023-06-26 15:22:21 +02:00
Ankush Menat
73bca16d77 feat: RQ WorkerPool
RQ now has experimental support for workerpools.

When to use this?

Roughly when you have more than 2 workers a workerpool might make
sense, below 2 it's overhead as master "pool" process will need to run
to manager workerpool itself.

Why is it any better?

Currently we just let supervisor duplicate the worker process N number
of times. This is inefficient from shared memory POV. Forking the
original process to create workers enables sharing of more memory thus
leading upwards of 60-70% reduction in memory usage with pool size of 8
workers.
2023-06-26 18:10:00 +05:30
Ankush Menat
7fbc6e8175 refactor: Simplify dequeue_strategy selection
Classes arent required anymore, it can just be a parm to worker class
isntead.
2023-06-26 17:42:18 +05:30
Ankush Menat
ca95b591ae refactor: Pass redis connection directly 2023-06-26 17:36:53 +05:30
Ankush Menat
ee74830460 chore: add github star CTA on server script sidebar
[skip ci]
2023-06-26 17:32:47 +05:30
Ankush Menat
e26152f0dc chore: use node18 for github workflow
[skip ci]
2023-06-26 13:29:18 +05:30
Ernesto Ruiz
84ac024396
chore: Add translation to text in Update kanban_settings.js (#21452)
[skip ci]
2023-06-26 10:35:49 +05:30
Ankush Menat
25c18e486c
Merge pull request #21461 from ruchamahabal/hooks
feat: before/after hooks for any app install/uninstall
2023-06-26 09:50:35 +05:30
Ankush Menat
bd7777120a
Merge pull request #21370 from surajshetty3416/update-node-dependencies
build!: Set minimum required node version as v18
2023-06-26 09:48:08 +05:30
Suraj Shetty
3667d1ae04 test: Simplify list_view test 2023-06-26 09:15:28 +05:30
Suraj Shetty
0d4574e95b fix: Use watch function to watch changes 2023-06-26 09:15:28 +05:30
Suraj Shetty
3982eeea22 chore: Fix linter warning 2023-06-26 09:15:20 +05:30
Suraj Shetty
4491f6c5b8 fix: Update recommended bundle of moment.js for browser
https://momentjs.com/timezone/docs/
this also helps reducing the bundle size
2023-06-26 09:14:17 +05:30
Suraj Shetty
fe25fe1db1 feat: A flag (--save-metafiles) to save esbuild metafiles
- Useful for analysing bundle size
2023-06-26 09:14:17 +05:30
Suraj Shetty
e4ff09ad6a test: Fix form flaky test 2023-06-26 09:14:17 +05:30
Suraj Shetty
e8fc200180 chore: Update dependencies 2023-06-26 09:14:17 +05:30
Suraj Shetty
efb8c24f72 chore: Upgrade vue v3.2 to v3.3
change log: https://blog.vuejs.org/posts/vue-3-3
2023-06-26 09:14:17 +05:30
Suraj Shetty
5581f960da chore: Update node version requirement in build config 2023-06-26 09:14:17 +05:30
Suraj Shetty
729c955665 chore: Update plyr to avoid build failures 2023-06-26 09:14:17 +05:30
Suraj Shetty
171b616e57 fix: Props should be constant as it is a read-only variable 2023-06-26 09:14:17 +05:30
Suraj Shetty
c44db90bed chore: Upgrade minimum required node version to 18
- Also update all the node packages
2023-06-26 09:14:17 +05:30
Ankush Menat
0e84fdaa6c build: bump RQ 2023-06-25 17:43:11 +05:30
Ankush Menat
1c27f99a11
Merge pull request #21475 from ankush/preload_modules
perf: pre-load common modules to reduce memory usage
2023-06-24 22:12:53 +05:30
Ankush Menat
af03b76c88 perf: Preload and share common python modules 2023-06-24 21:24:02 +05:30
Ankush Menat
793f4ebba3 perf: defer loading JWT 2023-06-24 19:50:08 +05:30
Ankush Menat
dc7620f0d8
Merge pull request #21474 from ankush/gc_freeze
perf: Freeze GC before forking Gunicorn workers
2023-06-24 17:41:59 +05:30
Ankush Menat
150c36c74d fix: collect before freezing 2023-06-24 17:36:10 +05:30
Ankush Menat
29d28a460f perf: Freeze GC right before starting background worker
BG worker forks are not CoW friendly. Freezing right before we start
worker should lessen overall memory usage. Though this isn't useful much
because at max you're sharing with 2 processes - master and horse.

WorkerPool can improve this benefit a lot by forking each worker from
master process and horse from forked processes. TBD when WorkerPool is
out of beta.
2023-06-24 17:06:23 +05:30
Ankush Menat
fbe3174914 perf: Bump alloc count to 7,000 for generation 0
This has overall 1-2% CPU usage reduction for little to no costs.
Benefits increase when doing bulk processing with lots of objects.
2023-06-24 17:02:45 +05:30
Ankush Menat
4f0a2e6e9c fix: move gc.freeze behind environ variable 2023-06-24 16:35:34 +05:30
Ankush Menat
32bd5d3e2c Revert "perf: defer many requests imports"
This reverts commit 71b44efcac.

This gets frequently imported from one place or another. Since with
gc.freeze we can mostly reuse the import from parent, let's just leave
it here.
2023-06-24 16:26:22 +05:30