5
3
mirror of https://github.com/tildeverse/lobsters synced 2024-06-20 15:37:04 +00:00
Commit Graph

128 Commits

Author SHA1 Message Date
9e4b0e1b27 fix application path 2024-01-16 14:17:08 -05:00
Peter Bhat Harkins
ac3b88c72a clear other (?) json/page cache (#1219) 2023-12-30 10:22:14 -06:00
Peter Bhat Harkins
2332d28022 bump gems except commonmarker (#1234)
lot of irritating churn out of standardrb here
2023-12-28 19:26:56 -06:00
Peter Bhat Harkins
1faa617707 don't expire cache dirs
There's not many of them, and there's a race condition where this script deletes
a dir at the same time the rails page cache wants to write a new file to it,
leading to 500s.
2023-12-25 09:26:27 -06:00
Peter Bhat Harkins
9ed75818fb update for new location 2023-12-19 10:56:45 -06:00
Peter Bhat Harkins
aa060669d5 wrap message IDs with <> in References header; #1227 2023-12-04 09:26:36 -06:00
Peter Bhat Harkins
ff34ce9872 fix #1227 email Date header, bug from 4dd0fe8 2023-12-04 09:11:47 -06:00
Peter Bhat Harkins
e3a51083d3 long dead code 2023-09-18 16:06:06 -05:00
Peter Bhat Harkins
b3d6903f05 standardrb: standard-rails 2023-09-14 08:45:21 -05:00
Peter Bhat Harkins
c3f8625788 standardrb
I can't take Rubocop any more. Moving up to Ruby 3 forces us to update RuboCop,
and it comes with dozens of linters that I'd have to evaluate, none of which is
a marginal improvement. I'm done having opinions.
2023-09-08 15:39:50 -05:00
Peter Bhat Harkins
4dd0fe865c fix #1196 mailing list comments 2023-08-30 08:51:33 -05:00
Peter Bhat Harkins
7463e444fb perf: rm two queries for counting similar stories on story show
also cleans out the last of the work scripts for the branch
2023-08-28 17:40:13 -05:00
Peter Bhat Harkins
482e49c1ec fix to match action name 2023-08-28 17:35:11 -05:00
Peter Bhat Harkins
ace23832fe rm dead calls to arrange_for_user 2023-08-24 02:54:26 -05:00
Peter Bhat Harkins
beab5b8e0c setup for selected perf test 2023-08-24 02:54:26 -05:00
Peter Bhat Harkins
786d13e9a3 ActiveRecord hackery to access depth and ordpath from Rails 2023-08-24 02:54:26 -05:00
Peter Bhat Harkins
ae121bb07a clear cache before run 2023-08-24 02:54:26 -05:00
Peter Bhat Harkins
ef571dfd31 integration perf test 2023-08-24 02:54:26 -05:00
Peter Bhat Harkins
ea9bd69b26 todo, fix depth warning 2023-08-24 02:54:26 -05:00
Peter Bhat Harkins
689461afc2 bytepacked per notes in test_bitpacking
'diff selected selected_bytepack' is ~10k changes, lots of stories have several
top-level 1-score comments whose ids cross the mod 256 boundary
2023-08-24 02:54:26 -05:00
Peter Bhat Harkins
1c49d35800 test of building ordpaths 2023-08-24 02:54:26 -05:00
Peter Bhat Harkins
9da1ca10ed finding workaround to concat binary strings, which are fixed-length 2023-08-24 02:54:26 -05:00
Peter Bhat Harkins
60fb9947ca mask to grab lowest byte 2023-08-24 02:54:26 -05:00
Peter Bhat Harkins
181be087c4 test bitpacking w notes on collisions 2023-08-24 02:54:26 -05:00
Peter Bhat Harkins
054c7ed536 todo notes 2023-08-24 02:54:26 -05:00
Peter Bhat Harkins
7056b36be0 scratch scripts for comparing algorithms on prod data 2023-08-24 02:54:26 -05:00
Peter Bhat Harkins
8f7d98dd8d cron job to fill flagged commenters cache 2022-09-01 08:12:16 -05:00
Peter Bhat Harkins
c7427c291e linebreak for rubocop 2022-03-19 17:11:04 -05:00
Peter Bhat Harkins
ef642dff69 fix Keystore.value_for; add some guardrails to mail_new_activity
Really embarassing bug in e334ae. This returned the current traffic intensity
number for all queries (0-100) so this started sending the mailing list mode
users basically every story and comment from the dawn of time.
2022-03-19 17:02:07 -05:00
Peter Bhat Harkins
e334ae41b4 perf improvements for traffic intensity
TrafficHelper's hot-path intensity does a single select for a single row and
loads the value rather than instantiate an ActiveRecord object.

Updating the intensity has moved entirely to the cron job to prevent dogpiling,
and does three upserts instead of select + upsert.

No more hassling around with different keys for intensity when we only use the
latest value.
2022-03-19 08:15:20 -05:00
Peter Bhat Harkins
dba88ba6c8 Story: rename expired -> deleted to match usage 2022-02-08 22:20:41 -06:00
GarbageHamburger
6440269051
Add X-Is-Author to mailing list headers (#940) 2020-10-24 23:37:21 +00:00
Peter Bhat Harkins
7e85eb081d extract story text cache for fast migrations 2020-08-25 07:51:09 -05:00
Peter Bhat Harkins
40b0d82f73 rm dead code
Environment should set the Rails env (and indeed our cron job does). If this
is present, running the spec alone fails because most devs don't configure a
'production' database on their local dev machines.

Caught by @AlessandroMinali
2020-07-13 19:47:26 -05:00
Andrew
a323dc244d Make mail_new_activity no-op silently (#732)
Fix #731
2019-09-11 07:03:10 -07:00
Peter Bhat Harkins
1b448d916e
bump rubocop (#690) 2019-06-18 06:54:27 -07:00
Jean-Baptiste Barth
1d9669491c validate SSL certs by default (#692)
Required for integrations (GitHub, Twitter, etc.) but deliberately
disabled when fetching titles.
2019-06-18 06:07:39 -07:00
Thomas Dziedzic
c6d27f3914 fix StderrPuts rubocop warnings
```
script/parse_inbound_mail:27:3: C: Style/StderrPuts: Use warn instead of STDERR.puts to allow such output to be disabled.
  STDERR.puts "no active user with mailing list token #{parser.user_token}"
  ^^^^^^^^^^^
script/parse_inbound_mail:34:3: C: Style/StderrPuts: Use warn instead of STDERR.puts to allow such output to be disabled.
  STDERR.puts "error parsing e-mail"
  ^^^^^^^^^^^
script/parse_inbound_mail:38:3: C: Style/StderrPuts: Use warn instead of STDERR.puts to allow such output to be disabled.
  STDERR.puts "no valid comment or story being replied to"
  ^^^^^^^^^^^
script/parse_inbound_mail:42:3: C: Style/StderrPuts: Use warn instead of STDERR.puts to allow such output to be disabled.
  STDERR.puts "no valid text/plain body found"
  ^^^^^^^^^^^
script/parse_inbound_mail:61:3: C: Style/StderrPuts: Use warn instead of STDERR.puts to allow such output to be disabled.
  STDERR.puts c.errors.inspect
  ^^^^^^^^^^^
script/sync_twitter_users:29:3: C: Style/StderrPuts: Use warn instead of STDERR.puts to allow such output to be disabled.
  STDERR.puts "need to implement paging for list members"
  ^^^^^^^^^^^
```
2019-06-13 09:00:21 -05:00
Peter Bhat Harkins
dfb4453275 replace traffic counting with measuring
No parameters that need tuning and a single select for most hits.
Logo intensity is based on traffic in the last 15m compared to the last 90
days, and that calculation is cached for 5m. Deliberately does not use
transactions: we don't need the correctness, and it's cheaper to overwrite
a couple times than lock Keystore. Addresses #536; will know in a week if it
closes.
2019-04-21 18:53:39 -05:00
Brian Kung
bedb54b0fc Q-encode characters as multiple encoded words 2019-04-17 13:06:00 +00:00
Abdullah Samman
8f46f991f3 Fix quoted-printable subject question-mark not being encoded
Fix #396
2018-12-05 09:11:09 -06:00
Peter Bhat Harkins
ec2062f132 don't run if file's required 2018-11-28 09:20:45 -06:00
Peter Bhat Harkins
0724c706fc name exceptions so we can ignore most of them
Now that we've had this in prod a while I've collected a few transient DNS
issues. Because webmentions are a nice-to-have, we can just drop the mention
if someone's DNS is flaking on us. We let BadIPsError hit logs because it
might be someone attempting to use this to enumerate our internal network
(tho it's most likely misconfiguration).
2018-11-20 08:18:10 -06:00
Peter Bhat Harkins
087df3bb6b bugfix empty string urls
Empty string URLs (any story with text and no link) passed this nil check but
threw an exception out of extras/sponge when it tried to get the host.
2018-11-20 08:07:12 -06:00
Andreza Medeiros
7e056d07b8 Fix invalid URI on script/send_new_webmentions
Fix #586
2018-11-07 12:17:56 -06:00
Jason Schweier
b43a5999b4 Fix Rubocop violation 2018-10-08 17:01:41 -05:00
Peter Bhat Harkins
5e6f1e6455 send webmentions
Merge #535
2018-10-03 10:16:50 -05:00
Thomas Dziedzic
998a721d72 bump rubocop 2018-08-15 14:44:11 +00:00
Peter Bhat Harkins
b835c25c61 fix bounds on whitespace reduction
The story_cache for Story i9u0aw has a line with 72 spaces. Subtracting that
from the line length of 72, that's 0, so the gsub regexp becomes /(.{1,0})/
and throws an exception.
2018-08-06 10:18:18 -05:00
Peter Bhat Harkins
32c9900dc3 fix spacing of tags on twitter
Fix #520
2018-06-28 15:33:08 -05:00