Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
3940b1ba
Commit
3940b1ba
authored
9 years ago
by
Calen Pennington
Browse files
Options
Downloads
Patches
Plain Diff
Add configuration for retries to ProgramsApiConfig
parent
c1d46ed5
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openedx/core/djangoapps/programs/migrations/0005_programsapiconfig_max_retries.py
+19
-0
19 additions, 0 deletions
...programs/migrations/0005_programsapiconfig_max_retries.py
openedx/core/djangoapps/programs/models.py
+9
-0
9 additions, 0 deletions
openedx/core/djangoapps/programs/models.py
with
28 additions
and
0 deletions
openedx/core/djangoapps/programs/migrations/0005_programsapiconfig_max_retries.py
0 → 100644
+
19
−
0
View file @
3940b1ba
# -*- 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
'
),
),
]
This diff is collapsed.
Click to expand it.
openedx/core/djangoapps/programs/models.py
+
9
−
0
View file @
3940b1ba
...
...
@@ -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
):
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment