Skip to content

Commit

Permalink
Drop retry_count, make error_count non-null
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Aug 17, 2021
1 parent c73cdc5 commit 785c879
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.2.6 on 2021-08-16 14:58
# Generated by Django 3.2.6 on 2021-08-17 16:31

from django.db import migrations, models

Expand All @@ -10,6 +10,15 @@ class Migration(migrations.Migration):
]

operations = [
migrations.RemoveField(
model_name="channelconnection",
name="retry_count",
),
migrations.AlterField(
model_name="channelconnection",
name="error_count",
field=models.IntegerField(default=0),
),
migrations.AlterField(
model_name="channelconnection",
name="error_reason",
Expand Down
4 changes: 1 addition & 3 deletions temba/channels/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1741,11 +1741,9 @@ class ChannelConnection(models.Model):
duration = models.IntegerField(null=True) # in seconds

error_reason = models.CharField(max_length=1, null=True, choices=ERROR_CHOICES)
error_count = models.IntegerField(null=True)
error_count = models.IntegerField(default=0)
next_attempt = models.DateTimeField(null=True)

retry_count = models.IntegerField(null=True) # TODO deprecate in favor of error_count

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

Expand Down

0 comments on commit 785c879

Please sign in to comment.