Private
Public Access
poll_due_feeds scanned for due feeds and dispatched fetch_feed without marking them claimed, so overlapping beat ticks or a slow-running fetch could dispatch the same feed twice, racing on ETag/status/error- count writes. Feed.claimed_at is now set via an UPDATE ... WHERE claimed_at IS NULL OR claimed_at < stale-cutoff, so only one caller's UPDATE can ever match a given row; fetch_feed clears it when done. A claim older than CLAIM_STALE_MINUTES is treated as abandoned so a worker dying mid-fetch doesn't wedge the feed forever. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
19 lines
392 B
Python
19 lines
392 B
Python
# Generated by Django 5.2.18 on 2026-10-31 18:00
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("feeds", "0002_remove_folder"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name="feed",
|
|
name="claimed_at",
|
|
field=models.DateTimeField(blank=True, null=True),
|
|
),
|
|
]
|