Skip to content

Initialize Scheduler before Migration to ensure hooks are registered #2785

@pfefferle

Description

@pfefferle

Problem

When migration calls add_to_outbox() (e.g., for Move activities), the post_activitypub_add_to_outbox action fires but the scheduler hooks (schedule_outbox_activity_for_federation, schedule_announce_activity) aren't registered yet because:

  • Migration::init() runs at init priority 1
  • Scheduler::init() runs at init priority 10 (default)

This causes activities added during migration to go to the outbox but never get scheduled for federation.

Proposed Solution

  • Change Scheduler::init() priority from 10 (default) to 0, so it runs before Migration::init() (priority 1)
  • This ensures that the post_activitypub_add_to_outbox hooks are registered before any migration code calls add_to_outbox()

Testing Instructions


GitHub Issue: #2771

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions