Commit 3940b1ba by Calen Pennington

Add configuration for retries to ProgramsApiConfig

parent c1d46ed5
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('programs', '0004_programsapiconfig_enable_certification'),
]
operations = [
migrations.AddField(
model_name='programsapiconfig',
name='max_retries',
field=models.PositiveIntegerField(default=11, help_text='When making requests to award certificates, make at most this many attempts to retry a failing request.', verbose_name='Maximum Certification Retries'),
),
]
......@@ -65,6 +65,15 @@ class ProgramsApiConfig(ConfigurationModel):
default=False
)
max_retries = models.PositiveIntegerField(
verbose_name=_("Maximum Certification Retries"),
default=11, # This gives about 30 minutes wait before the final attempt
help_text=_(
"When making requests to award certificates, make at most this many attempts "
"to retry a failing request."
)
)
@property
def internal_api_url(self):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment