Commit graph

1442 commits

Author SHA1 Message Date
Wesley Aptekar-Cassels 3e78e398c0 Switch from priority queues to function-based queues
Fixes: #2907
2023-07-20 12:25:30 -04:00
Jascha Ezra Urbach a601be4708
Merge branch 'main' into 2678 2023-06-01 16:53:28 +02:00
Mouse Reeve 9056a5d9e7
Merge pull request #2842 from bookwyrm-social/set-remote-server
Set remote servers synchonously where possible
2023-05-30 10:51:39 -07:00
Mouse Reeve a4ccd45537
Merge pull request #2812 from hughrun/gts
Fix federation with GoToSocial and inconsistent KeyId in headers
2023-05-29 19:54:00 -07:00
Mouse Reeve 0e0d9d2d08 Updates ignore html error list 2023-05-15 05:31:07 -07:00
Mouse Reeve 379db26300 Fixes user model tests for new param 2023-05-07 10:01:33 -07:00
Zach Flanders f43d7f8c70 fixing test and other checks 2023-04-25 21:00:16 -05:00
Zach Flanders 575e1bac4c responding to review comments 2023-04-25 19:46:38 -05:00
Zach Flanders 6b39052fcc Adding test for sort_title population 2023-04-25 07:17:23 -05:00
Hugh Rundle a0b7112c9c
Merge branch 'main' into gts 2023-04-14 18:24:02 +10:00
Hugh Rundle 98726585f6 oops black 2023-04-14 18:20:06 +10:00
Hugh Rundle 8a8af4e909 fix tests and make pylint happier 2023-04-14 18:03:51 +10:00
Hugh Rundle 123628c66a fix tests and formatting 2023-04-13 22:33:54 +10:00
Mouse Reeve 4e3513bd41
Merge pull request #2784 from WesleyAC/add-status-cache-get-audience
Only call get_audience once in add_status
2023-04-07 06:43:04 -07:00
Wesley Aptekar-Cassels 68c6a9e748 Rename remove_object_from_related_stores
This makes the stores argument required, making it simpler to change the
code.
2023-04-05 22:06:09 -04:00
Josh Soref 359228127d spelling: wyrm
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 2a914f98b7 spelling: versions
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 7170e8972d spelling: uneventfully
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 63dbb6a291 spelling: successfully
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 9dc3cdca5d spelling: statuses
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 4607d30cad spelling: signatures
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 7a6e249614 spelling: sensitivity
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 02bf018271 spelling: search
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref e7d8692836 spelling: receiving
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 55b6d63774 spelling: quotation
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 27f025bc39 spelling: presence
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 44b4b10eb8 spelling: password
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref d640bc9b1c spelling: nonexistent
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 0b30373bd3 spelling: mention'd
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 1320108703 spelling: markdown
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref e8894b159f spelling: irrelevant
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref cee2de41ca spelling: handling
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 9c5d588630 spelling: fields
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 3b9828c0fc spelling: existing
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 445cb60f2c spelling: example
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 3850183e95 spelling: doesn't
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 6b0e51caf4 spelling: currently
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref def58a3e18 spelling: activity
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 11:14:03 -04:00
Mouse Reeve f1640399e3 Python formatting 2023-03-29 10:13:44 -07:00
Mouse Reeve 4fcb01805e Fixes test comparison string 2023-03-29 09:14:30 -07:00
Mouse Reeve 8a0e88db83 Adds test for links with # symbols 2023-03-29 08:39:41 -07:00
Mouse Reeve 42dd199084 Unit test that identifies clashes between links and mentions 2023-03-29 08:28:45 -07:00
Mouse Reeve 0cebc4388c Adds unit tests for referer helper 2023-03-20 12:47:21 -07:00
Mouse Reeve 2de115fc1e Add helper to refer views back to http referers safely
In most cases, we want to return back to where we came from after
performing an action. It's not safe to return to an arbitrary referer,
so this streamlines using the util validator to verify the redirect and
fall back on regular redirect params if the referer is outside our
domain.
2023-03-20 10:25:38 -07:00
Mouse Reeve 12af5992a3
Merge pull request #2524 from chdorner/feature/tag-support
Initial hashtag support
2023-03-12 16:37:39 -07:00
Mouse Reeve 84b8a5c433
Merge pull request #2713 from WesleyAC/buffer-csv-export
Change CSV export to buffer instead of streaming
2023-03-12 16:17:53 -07:00
Mouse Reeve c28d523e6f
Merge branch 'main' into get-audience-perf 2023-03-12 15:40:53 -07:00
Wesley Aptekar-Cassels 2a5f722f6e Optimize add/remove book statuses task queries
The queries as they previously existed required joining together 12
different tables, which is extremely expensive. Splitting it into four
queries means that the individual queries can effectively use the
indexes we have, and should be very fast no matter how many statuses are
in the database.

Removing the .distinct() call is fine, since we're adding them to a set
in Redis anyways, which will take care of the duplicates.

It's a bit ugly that we now make four separate calls to Redis (this
might result in things being slightly slower in cases where there are an
extremely small number of statuses), but doing things differently would
result in significantly more surgery to the existing code, so I've opted
to avoid that for the moment.

Fixes: #2725
2023-03-09 15:26:03 -05:00
Wesley Aptekar-Cassels 23698dafe5 Change get_audience to return list of user IDs
This will make it simpler to implement various optimizations.
2023-03-09 00:50:24 -05:00
Wesley Aptekar-Cassels 41e14bdfaf Change unread_by_status_type_id to take user ID
Same reason as in prior commit.
2023-03-09 00:50:24 -05:00