Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
2f3b0b4c
Commit
2f3b0b4c
authored
Feb 26, 2017
by
Nimisha Asthagiri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Storage-backed versioned Block Structures: Settings
parent
fb73888e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
11 deletions
+19
-11
lms/envs/aws.py
+3
-0
lms/envs/bok_choy.py
+3
-3
lms/envs/common.py
+8
-3
openedx/core/djangoapps/content/block_structure/signals.py
+1
-1
openedx/core/djangoapps/content/block_structure/tasks.py
+4
-4
No files found.
lms/envs/aws.py
View file @
2f3b0b4c
...
...
@@ -597,6 +597,9 @@ BROKER_URL = "{0}://{1}:{2}@{3}/{4}".format(CELERY_BROKER_TRANSPORT,
CELERY_BROKER_VHOST
)
BROKER_USE_SSL
=
ENV_TOKENS
.
get
(
'CELERY_BROKER_USE_SSL'
,
False
)
# Block Structures
BLOCK_STRUCTURES_SETTINGS
=
ENV_TOKENS
.
get
(
'BLOCK_STRUCTURES_SETTINGS'
,
BLOCK_STRUCTURES_SETTINGS
)
# upload limits
STUDENT_FILEUPLOAD_MAX_SIZE
=
ENV_TOKENS
.
get
(
"STUDENT_FILEUPLOAD_MAX_SIZE"
,
STUDENT_FILEUPLOAD_MAX_SIZE
)
...
...
lms/envs/bok_choy.py
View file @
2f3b0b4c
...
...
@@ -80,11 +80,11 @@ BLOCK_STRUCTURES_SETTINGS = dict(
# We have CELERY_ALWAYS_EAGER set to True, so there's no asynchronous
# code running and the celery routing is unimportant.
# It does not make sense to retry.
BLOCK_STRUCTURES_
TASK_MAX_RETRIES
=
0
,
TASK_MAX_RETRIES
=
0
,
# course publish task delay is irrelevant is because the task is run synchronously
BLOCK_STRUCTURES_
COURSE_PUBLISH_TASK_DELAY
=
0
,
COURSE_PUBLISH_TASK_DELAY
=
0
,
# retry delay is irrelevent because we never retry
BLOCK_STRUCTURES_
TASK_DEFAULT_RETRY_DELAY
=
0
,
TASK_DEFAULT_RETRY_DELAY
=
0
,
)
###################### Grade Downloads ######################
...
...
lms/envs/common.py
View file @
2f3b0b4c
...
...
@@ -1805,13 +1805,18 @@ BLOCK_STRUCTURES_SETTINGS = dict(
# for a better chance at getting the latest changes when there
# are secondary reads in sharded mongoDB clusters. See TNL-5041
# for more info.
BLOCK_STRUCTURES_
COURSE_PUBLISH_TASK_DELAY
=
30
,
COURSE_PUBLISH_TASK_DELAY
=
30
,
# Delay, in seconds, between retry attempts if a task fails.
BLOCK_STRUCTURES_
TASK_DEFAULT_RETRY_DELAY
=
30
,
TASK_DEFAULT_RETRY_DELAY
=
30
,
# Maximum number of retries per task.
BLOCK_STRUCTURES_TASK_MAX_RETRIES
=
5
,
TASK_MAX_RETRIES
=
5
,
# Backend storage
# STORAGE_CLASS='storages.backends.s3boto.S3BotoStorage',
# STORAGE_KWARGS=dict(bucket='nim-beryl-test'),
# DIRECTORY_PREFIX='/modeltest/',
)
################################ Bulk Email ###################################
...
...
openedx/core/djangoapps/content/block_structure/signals.py
View file @
2f3b0b4c
...
...
@@ -28,7 +28,7 @@ def _listen_for_course_publish(sender, course_key, **kwargs): # pylint: disable
update_course_in_cache
.
apply_async
(
[
unicode
(
course_key
)],
countdown
=
settings
.
BLOCK_STRUCTURES_SETTINGS
[
'
BLOCK_STRUCTURES_
COURSE_PUBLISH_TASK_DELAY'
],
countdown
=
settings
.
BLOCK_STRUCTURES_SETTINGS
[
'COURSE_PUBLISH_TASK_DELAY'
],
)
...
...
openedx/core/djangoapps/content/block_structure/tasks.py
View file @
2f3b0b4c
...
...
@@ -22,8 +22,8 @@ NO_RETRY_TASKS = (XMLSyntaxError, LoncapaProblemError, UnicodeEncodeError)
@task
(
default_retry_delay
=
settings
.
BLOCK_STRUCTURES_SETTINGS
[
'
BLOCK_STRUCTURES_
TASK_DEFAULT_RETRY_DELAY'
],
max_retries
=
settings
.
BLOCK_STRUCTURES_SETTINGS
[
'
BLOCK_STRUCTURES_
TASK_MAX_RETRIES'
],
default_retry_delay
=
settings
.
BLOCK_STRUCTURES_SETTINGS
[
'TASK_DEFAULT_RETRY_DELAY'
],
max_retries
=
settings
.
BLOCK_STRUCTURES_SETTINGS
[
'TASK_MAX_RETRIES'
],
bind
=
True
,
)
def
update_course_in_cache
(
self
,
course_id
):
...
...
@@ -34,8 +34,8 @@ def update_course_in_cache(self, course_id):
@task
(
default_retry_delay
=
settings
.
BLOCK_STRUCTURES_SETTINGS
[
'
BLOCK_STRUCTURES_
TASK_DEFAULT_RETRY_DELAY'
],
max_retries
=
settings
.
BLOCK_STRUCTURES_SETTINGS
[
'
BLOCK_STRUCTURES_
TASK_MAX_RETRIES'
],
default_retry_delay
=
settings
.
BLOCK_STRUCTURES_SETTINGS
[
'TASK_DEFAULT_RETRY_DELAY'
],
max_retries
=
settings
.
BLOCK_STRUCTURES_SETTINGS
[
'TASK_MAX_RETRIES'
],
bind
=
True
,
)
def
get_course_in_cache
(
self
,
course_id
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment