current
Last change
on this file since 715671f was
715671f,
checked in by Borja Lopez <borja@…>, 4 years ago
|
(#77) Bulk workouts upload:
- Added methods to extract files from compressed bulk files, then load
workouts from those files.
- Added a task to process/load workouts from "not loaded" bulk files
- Added full tests coverage
|
-
Property mode set to
100644
|
File size:
652 bytes
|
Rev | Line | |
---|
[b5d87e0] | 1 | import sys |
---|
| 2 | |
---|
| 3 | from ow.tasks.manager import TasksManager |
---|
| 4 | from ow.tasks.mail import queue_processor |
---|
[715671f] | 5 | from ow.tasks.bulk import process_compressed_files |
---|
[b5d87e0] | 6 | |
---|
| 7 | |
---|
| 8 | def command_line(): |
---|
| 9 | tasks_manager = TasksManager() |
---|
| 10 | |
---|
| 11 | # "register" the tasks |
---|
| 12 | tasks_manager.add_task('send_emails', queue_processor) |
---|
[715671f] | 13 | tasks_manager.add_task('bulk_import', process_compressed_files) |
---|
[b5d87e0] | 14 | |
---|
| 15 | if len(sys.argv) != 3: |
---|
| 16 | tasks_manager.usage(sys.argv[0]) |
---|
| 17 | sys.exit(1) |
---|
| 18 | |
---|
| 19 | script_name = sys.argv[0] |
---|
| 20 | ini_file = sys.argv[1] |
---|
| 21 | action = sys.argv[2] |
---|
| 22 | |
---|
| 23 | tasks_manager.run(script_name, ini_file, action) |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | if __name__ == '__main__': |
---|
| 27 | command_line() # pragma no cover |
---|
Note: See
TracBrowser
for help on using the repository browser.