Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-data-api
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-analytics-data-api
Commits
2598c1cb
Commit
2598c1cb
authored
Jun 02, 2014
by
Gabe Mulley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure files are placed in org subdirectory in archive
Change-Id: I0f931d37203f8b24b84ece26cdfb93e8918e71b3
parent
80d99fb7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
edx/analytics/tasks/archive.py
+1
-1
edx/analytics/tasks/tests/test_archive.py
+3
-2
No files found.
edx/analytics/tasks/archive.py
View file @
2598c1cb
...
@@ -97,7 +97,7 @@ class ArchiveExportTask(MultiOutputMapReduceJobTask):
...
@@ -97,7 +97,7 @@ class ArchiveExportTask(MultiOutputMapReduceJobTask):
task
=
PathSetTask
(
src
=
org_source
,
include
=
[
'*.log*'
])
task
=
PathSetTask
(
src
=
org_source
,
include
=
[
'*.log*'
])
for
target
in
task
.
output
():
for
target
in
task
.
output
():
target_url
=
target
.
path
target_url
=
target
.
path
relative_url
=
target_url
[
len
(
org_source
):]
.
lstrip
(
'/'
)
relative_url
=
target_url
[
len
(
self
.
eventlog_output_root
):]
.
lstrip
(
'/'
)
yield
(
target_url
,
relative_url
)
yield
(
target_url
,
relative_url
)
def
mapper
(
self
,
_line
):
def
mapper
(
self
,
_line
):
...
...
edx/analytics/tasks/tests/test_archive.py
View file @
2598c1cb
...
@@ -84,11 +84,12 @@ class ArchiveExportTaskTestCase(unittest.TestCase):
...
@@ -84,11 +84,12 @@ class ArchiveExportTaskTestCase(unittest.TestCase):
"""
"""
Extract parameters from log file name.
Extract parameters from log file name.
Expects name of form "prod-edge-edxapp-001/2014-05-09_HSchoolX.log".
Expects name of form "
HSchoolX/
prod-edge-edxapp-001/2014-05-09_HSchoolX.log".
"""
"""
server
,
name
=
logfile_name
.
split
(
'/'
)
org_dir
,
server
,
name
=
logfile_name
.
split
(
'/'
)
date
,
org
=
name
.
split
(
'_'
)
date
,
org
=
name
.
split
(
'_'
)
org
=
org
[:
-
4
]
org
=
org
[:
-
4
]
self
.
assertEquals
(
org_dir
,
org
)
return
org
,
server
,
date
return
org
,
server
,
date
def
_check_tar_file_contents
(
self
,
tarfile_path
):
def
_check_tar_file_contents
(
self
,
tarfile_path
):
...
...
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