Commit Graph

23 Commits (057648778bfcae1ef5dbd6840966030d3be82a4d)

Author SHA1 Message Date
Your Name c4e5b96d25 Stream deletions with cursor and batch notification lookups in delete jobs
The status- and account-deletion jobs loaded whole collections with
->get() and then looped, running a per-row Notification lookup inside
each iteration.

- StatusDelete / RemoteStatusDelete: resolve associated DirectMessage and
  MediaTag ids, fetch their notifications in a single whereIn query,
  clear each via cursor (NotificationService::del must run per row for
  cache/redis cleanup), then bulk delete the DMs and media tags.
- DeleteAccountPipeline / DeleteRemoteProfilePipeline: stream Story and
  Collection deletions with cursor() instead of loading every row into
  memory. Per-row file unlink and item deletes are preserved.

Adds StatusDeleteCleanupTest covering DM + notification cleanup, media
tag + notification cleanup, and the no-associations case.
3 weeks ago
Your Name 69869536a1 Fix remote status deletion leaking attached media, add status:media command
MediaDeletePipeline skips deletion when media->status_id is set. status_id has
no FK/cascade, so deleting a status never clears it, and the delete jobs
dispatched by the status-delete paths were always skipped, leaking media files.

Detach media (status_id = null) before dispatching the delete in StatusDelete,
RemoteStatusDelete and DeleteRemoteStatusPipeline, so the row is genuinely
orphaned by the time the guard checks it and the deletion proceeds.

Also adds a status:media diagnostic command that dumps all metadata for a
media id (DB columns, computed URLs, attachment state, parent status including
the dangling status_id case, owner, metadata, and an optional live URL check).
3 weeks ago
Your Name c0cde2f682 refactor: move 52 legacy models from App\ to App\Models\
Move all Eloquent models from the app/ root directory to app/Models/
for consistency with modern Laravel conventions. The project already had
54 models in App\Models; this migrates the remaining 52 legacy models.

Changes:
- Move 52 model files from app/ to app/Models/
- Update namespace declarations in each model
- Update all ~1000 import references across the codebase
- Add Relation::morphMap() in AppServiceProvider for backward
  compatibility with existing polymorphic database records
- Add missing HasSnowflakePrimary imports for models that relied
  on same-namespace resolution
4 weeks ago
Daniel Supernault 33dce75f2c
Pint app/ 4 weeks ago
Shift 19880c2ffb
Convert string references to `::class`
PHP 5.5.9 adds the new static `class` property which provides the fully qualified class name. This is preferred over using strings for class names since the `class` property references are checked by PHP.
4 weeks ago
Daniel Supernault 53742fa699
Lint 9 months ago
Your Name efb9db3eed StatusPipeline defensive checks 11 months ago
Daniel Supernault 4ab85248e9
Update RemoteStatusDelete, fix decrement logic 1 year ago
Daniel Supernault 2910b61d21
Update RemoteStatusDelete.php 2 years ago
Daniel Supernault f3b596f0c8
Update RemoteStatusDeletePipeline 2 years ago
Daniel Supernault b81ae5773f
Update AP helpers, refactor post count decrement logic 3 years ago
Daniel Supernault 1be21c76f3
Fix StatusHashtag delete bug 3 years ago
Daniel Supernault fcbcd7ec73
Update Delete pipelines, delete status hashtags quietly 3 years ago
Daniel Supernault 4c95306f12
Update StatusPipeline, fix Direct and Story notification deletion 3 years ago
Daniel Supernault ce54d29c69
Update delete pipelines, properly invoke StatusHashtag delete events 3 years ago
Daniel Supernault b76ad7cfe0
Update RemoteStatusDelete, fix include 3 years ago
Daniel Supernault f481f3d248
Update RemoteStatusDelete pipeline 3 years ago
Daniel Supernault edbcf3ed79
Update RemoteStatusDelete and DecrementPostCount pipelines 3 years ago
Daniel Supernault 618b67271a
Update RemoteStatusPipeline, fix reply check 3 years ago
Daniel Supernault fab8f25e9b
Update RemoteStatusDelete pipeline 3 years ago
Daniel Supernault 71e92261f4
Update RemoteStatusDelete pipeline 3 years ago
Daniel Supernault 45be6e10b8
Update RemoteStatusDelete pipeline 3 years ago
Daniel Supernault ed87ddb923
Update RemoteStatusDelete pipeline 3 years ago