Commit Graph

11 Commits

Author SHA1 Message Date
Mike Dalessio 1bbb6d0c03 Fix race condition in Card::ActivitySpike::DetectionJob
The check-then-act pattern in `register_activity_spike` has been
replaced with `find_or_create_by!` to eliminate the race condition
that could lead to creating multiple activity spikes for a card. To
support this change, the `card_id` index on `cards_activity_spikes`
has been made unique.

ref: https://app.fizzy.do/5986089/cards/3063
2025-11-20 15:40:42 -05:00
Kevin McConnell 1959e15f7e Fix more tests
These are mainly because the fixture's UUIDs are deterministic rather
than time-sortable, and more places where we need to correct the fixture
IDs as well.
2025-11-17 09:12:31 -05:00
Jorge Manrubia c007176ed0 Don't broadcast card changes when touching activity spikes
We do this from jobs, so there is no request id to discard the page refresh in the client. We
don't want page refreshes in these cases, as those are normally handled via the change that
originated this detection, in any case.
2025-11-03 14:35:06 +01:00
Jorge Manrubia e70827b2ca Parametrize method instead of hanving methods hanging around
If we need more complex calculations for those we can extract again
2025-06-05 15:23:15 +02:00
Jorge Manrubia 0ac937b208 Rename 2025-06-05 15:20:36 +02:00
Jorge Manrubia 6688ca3e82 Consider reopened cards as an activity spike 2025-06-05 15:16:13 +02:00
Jorge Manrubia 35731980fb extract method 2025-06-05 14:06:21 +02:00
Jorge Manrubia 6fec61edf4 Tweak params 2025-06-05 11:19:03 +02:00
Jorge Manrubia 20c1119674 Wip for showing stalled 2025-06-04 17:18:10 +02:00
Jorge Manrubia 9cdc34f0ae Basic tests for detecting stalled cards 2025-06-04 17:18:01 +02:00
Jorge Manrubia b790da9617 WIP for stalled cards 2025-06-04 17:18:01 +02:00