Create a background job that processes messages from the queue, calculates edit differences, and saves the results to the ce_event_contributions table.
The job should:
Read messages from the queue containing edit association data
Fetch revision data from the Revision API (current and previous revisions)
Calculate differences including bytes added/removed, characters added/removed, internal links, and new article status
Save the calculated data to the ce_event_contributions table
Handle errors gracefully and retry failed messages
Update the contributions tab to indicate data is available
BDD
Feature: Process edit-to-event associations in background
Scenario: Successfully process edit association
Given a message exists in the queue with edit data
When the background job processes the message
Then revision data is fetched from Revision API
And differences are calculated (bytes, links)
And data is saved to ce_event_contributions table
And the message is removed from the queue
Scenario: Calculate edit differences
Given a revision contains changes
When the job calculates differences
Then bytes added and removed are calculated
And internal links are identified
And new article status is determined
Scenario: Handle revision API errors
Given the Revision API returns an error
When the job processes the message
Then the message is not removed from the queue
And the job logs the error
And the message is retried later
Scenario: Handle database save errors
Given the database save operation fails
When the job processes the message
Then the message is not removed from the queue
And the job logs the error
And the message is retried later
Scenario: Process multiple messages
Given multiple messages exist in the queue
When the background job runs
Then each message is processed individually
And successful messages are removed from queue
And failed messages remain for retry
