Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzzwen committed Mar 14, 2017
2 parents 072ca88 + d56ba32 commit a62b31f
Show file tree
Hide file tree
Showing 56 changed files with 1,569 additions and 1,068 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ hs_err_pid*
backend/node_modules/

# config file and various api keys
data/config.py
data/public_data/config.py

# python compiles
data/__pycache__/
Expand Down
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,13 @@ before_script:
- cd ..
before_install:
- cd data
- python3 -V
- python3 -c "import sys;print('\n'.join(sys.path))"
- sudo apt-get -y install python3-pip
- pip3 install bs4
- pip3 install lxml
- pip3 list
- pip3 show lxml
- cd ..
install:
- cd backend
- npm install
script:
- npm test
- cd ..
- cd data
- python3 -m unittest test/test_moviedata.py

27 changes: 18 additions & 9 deletions data/cron.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
import etl.etlprocessor as processor
from controller import ETLController
from apscheduler.schedulers.blocking import BlockingScheduler

import logging


if __name__ == '__main__':
logging.basicConfig(level=logging.WARNING)
scheduler = BlockingScheduler()
processor = processor.ETLProcessor()
scheduler.add_job(processor.update_movie_data, args=[1, 1000000, 0])
scheduler.add_job(processor.update_movie_data, args=[1000000, 2000000, 5])
# scheduler.add_job(processor.update_movie_data, args=[2000000, 3000000, 10])
# scheduler.add_job(processor.update_movie_data, args=[3000000, 4000000, 15])
# scheduler.add_job(processor.update_movie_data, args=[4000000, 5000000, 20])
# scheduler.add_job(processor.update_movie_data, args=[5000000, 6000000, 25])
# scheduler.add_job(processor.update_movie_data, args=[6000000, 7000000, 30])

controller = ETLController()
scheduler.add_job(controller.update_movie_data, args=[321535, 1000000, 0])
# scheduler.add_job(controller.update_movie_data, args=[1172158, 2000000, 5])
# scheduler.add_job(controller.update_movie_data, args=[2033967, 3000000, 10])
# scheduler.add_job(controller.update_movie_data, args=[3052760, 4000000, 15])

scheduler.start()

#
# if __name__ == '__main__':
# logging.basicConfig(level=logging.WARNING)
# controller = ETLController()
# controller.update_movie_rating()
96 changes: 0 additions & 96 deletions data/etl/cinemalist.py

This file was deleted.

102 changes: 0 additions & 102 deletions data/etl/etlprocessor.py

This file was deleted.

52 changes: 0 additions & 52 deletions data/etl/extractor.py

This file was deleted.

77 changes: 0 additions & 77 deletions data/etl/loader.py

This file was deleted.

Loading

0 comments on commit a62b31f

Please sign in to comment.