Commit graph

42509 commits

Author SHA1 Message Date
Ankush Menat
b2366bf8a6 fix: accurately handle socket close/loss event 2023-07-01 10:53:34 +05:30
Ankush Menat
4ea6f3d672 perf: dont send doc view updates to self 2023-07-01 10:53:34 +05:30
Ankush Menat
c3a37421d6 chore: remove typing code 2023-07-01 10:53:34 +05:30
Ankush Menat
43ec9fe2cc refactor: simplify open doc checks 2023-07-01 10:53:34 +05:30
Ankush Menat
7591f3fd62 refactor: merge frappe.realtime and frappe.socketio
frappe.realtime should be the api which encapsulates socketio.
2023-07-01 10:53:34 +05:30
Ankush Menat
73f388628f refactor: Convert socketio client to class 2023-07-01 10:53:34 +05:30
Ankush Menat
0ea7f77dd1 perf: Remove socketio reconnect attempts
It works just fine without it. This sends duplicate events.
2023-07-01 10:53:34 +05:30
Ankush Menat
d772365d5d fix: dont query if unknown_users are empty 2023-07-01 10:53:34 +05:30
Ankush Menat
38f04be747 fix: remove hacky logic for doc open and doc close
How and why is this so complicated?
- If doc is opned - send doc open event
- If doc gets closed - send doc close event.

No need to rememeber last doc and do weird logic on top of it.
2023-07-01 10:53:34 +05:30
Ankush Menat
fbcc594986 fix: Correctly update form viewers
People who stopped viewing forms weren't removed, even though event was
sent.
2023-07-01 10:53:34 +05:30
Ankush Menat
3511f82dc2 refactor: dont rely on docinfo for form viewers 2023-07-01 10:53:34 +05:30
Ankush Menat
94f182384c refactor: move viewers to form
it's attached to form but managed by toolbar, needlessly convoluted
code.
2023-07-01 10:53:34 +05:30
Ankush Menat
de5d1e0fe1 refactor: Consolidate doc viewer code
It's spread accross 3 different JS files.
It should be responsibility of 1 class.
2023-07-01 10:53:34 +05:30
Ankush Menat
97c1106aca refactor!: Remove doc typer code
- This hasn't worked since v13 refactor and no one has noticed.
- Needs better implementation.
2023-07-01 10:53:34 +05:30
Ankush Menat
441495b561
refactor!: Drop support for currentsite.txt (#21536)
* refactor!: Drop currentsite.txt

- `bench use` will continue to work.
- Instead of txt file use common_site_config to set default site using `default_site` key.
- `FRAPPE_SITE` environment variable also works

* fix(DX): warn if non-empty currentsite.txt is present
2023-06-30 17:57:40 +05:30
Ankush Menat
f5e75c2fef
Merge pull request #21397 from cogk/fix-test_never_render
fix(test): Fix test_never_render to get path as string, exclude .pyc files from served files
2023-06-30 16:44:51 +05:30
Corentin Flr
4ccfd1e8fa
Merge branch 'frappe:develop' into fix-test_never_render 2023-06-30 11:52:33 +02:00
Corentin Flr
69d0060bdf
chore: format code 2023-06-30 11:52:29 +02:00
Suraj Shetty
f057bb3381
Merge pull request #21520 from barredterra/group-by-style 2023-06-30 14:02:07 +05:30
Smit Vora
c6a46e6812
fix: correct condition check for dynamic filters (#21530)
Co-authored-by: Sagar Vora <sagar@resilient.tech>
2023-06-30 13:35:01 +05:30
Ankush Menat
810185d531
Merge pull request #21526 from ankush/namespace_all_jobs
refactor: Namespace all RQ jobs
2023-06-29 18:34:23 +05:30
Ankush Menat
a52485cc53 feat: RQ jobs can show count 2023-06-29 18:06:52 +05:30
Ankush Menat
31d05b466a perf: Email queue dedup using job id instead of name 2023-06-29 18:05:09 +05:30
Ankush Menat
d57c552e26 feat: frappe.enqueue with deduplication
use deduplicate=True and set job_id for automatic and mostly sane job deduplication.
2023-06-29 18:05:07 +05:30
Ankush Menat
3ae2d19073 perf: efficient RQ jobs filters
Assuming site's job start with site prefix it's much easier to filter
jobs by looking at job IDs instead of fetching entire job in memory.
2023-06-29 17:31:10 +05:30
Ankush Menat
1092eef7bd perf: faster pending jobs check 2023-06-29 17:31:06 +05:30
Ankush Menat
1668ba7d9e feat: Namespace all RQ jobs to site 2023-06-29 16:35:10 +05:30
Raffael Meyer
6e1a1bf0b8
Merge branch 'develop' into group-by-style 2023-06-29 09:05:05 +02:00
Shariq Ansari
74633305c1
Merge pull request #21425 from shariquerik/log-webhook-error
fix: log errors while getting headers and data
2023-06-29 04:52:51 +05:30
Suraj Shetty
38760f9f57
Merge pull request #21519 from ankush/perf_share_reads 2023-06-28 21:48:00 +05:30
barredterra
85145c2c11 fix: styling of group by button 2023-06-28 17:22:40 +02:00
Ankush Menat
e4bae5c831 perf: faster doc shared checks
- If document, explicitly query document
- If checking doctype then put limit and only see if 1 record is
  returned.
2023-06-28 20:00:55 +05:30
Ankush Menat
c73d9fb783 test: add perf test helper for counting rows read 2023-06-28 19:51:18 +05:30
Ankush Menat
9f37d7e9f2
Merge pull request #21513 from ankush/session_expiry
fix: session expiry logic
2023-06-28 18:33:55 +05:30
Ankush Menat
0e1236b6be refactor: Simplify expiry queries.
Dont rely on mysql dateutils, simply compare dates with a cutoff.
2023-06-28 18:05:12 +05:30
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
Ankush Menat
f3c876e43e
chore: ignore pyo files too 2023-06-28 11:43:23 +05:30
Ankush Menat
38f08bb695
Merge branch 'develop' into fix-test_never_render 2023-06-28 11:41:51 +05:30
Suraj Shetty
48db27676e
Merge pull request #21510 from surajshetty3416/remove-broken-image-mixin 2023-06-28 11:31:08 +05:30
Shariq Ansari
7ba35ffc45
Merge branch 'develop' into log-webhook-error 2023-06-28 11:20:00 +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