Skip to content

Commit

Permalink
Add 10min polling_interval for feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
thenav56 committed Apr 30, 2024
1 parent 6dfc475 commit e984fe9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/cap_feed/data_injector/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def inject_feeds():
if Feed.objects.filter(url=feed.url).first():
continue
feed.format = feed_entry['format']
feed.polling_interval = 60
feed.polling_interval = Feed.PoolingInterval.I_10m
feed.enable_polling = True
feed.enable_rebroadcast = True
feed.official = True
Expand Down
2 changes: 1 addition & 1 deletion apps/cap_feed/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class Migration(migrations.Migration):
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('url', models.CharField(unique=True)),
('format', models.CharField(choices=[('atom', 'ATOM'), ('rss', 'RSS'), ('nws_us', 'NWS_US')])),
('polling_interval', models.IntegerField(choices=[(5, '5 seconds'), (10, '10 seconds'), (15, '15 seconds'), (20, '20 seconds'), (25, '25 seconds'), (30, '30 seconds'), (35, '35 seconds'), (40, '40 seconds'), (45, '45 seconds'), (50, '50 seconds'), (55, '55 seconds'), (60, '60 seconds')])),
('polling_interval', models.IntegerField(choices=[(5, '5 seconds'), (10, '10 seconds'), (15, '15 seconds'), (20, '20 seconds'), (25, '25 seconds'), (30, '30 seconds'), (35, '35 seconds'), (40, '40 seconds'), (45, '45 seconds'), (50, '50 seconds'), (55, '55 seconds'), (60, '60 seconds'), (600, '10 minutes')])),
('enable_polling', models.BooleanField(default=False)),
('enable_rebroadcast', models.BooleanField(default=False)),
('official', models.BooleanField(default=False)),
Expand Down
1 change: 1 addition & 0 deletions apps/cap_feed/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class PoolingInterval(models.IntegerChoices):
I_50 = 50, '50 seconds'
I_55 = 55, '55 seconds'
I_60 = 60, '60 seconds'
I_10m = 600, '10 minutes'

class Format(models.TextChoices):
ATOM = 'atom', 'ATOM'
Expand Down
1 change: 1 addition & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ enum FeedPoolingIntervalEnum {
I_50
I_55
I_60
I_10m
}

enum FeedStatusEnum {
Expand Down

0 comments on commit e984fe9

Please sign in to comment.