This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

a more sane way of doing this

  • Loading branch information...
TylerFisher committed Nov 7, 2016
1 parent 6dab027 commit 858c3472ce4911bb9f2d6bdbe7cd7b37e679eb1f
Showing with 3 additions and 7 deletions.
  1. +1 −5 fabfile/__init__.py
  2. +0 −2 fabfile/daemons.py
  3. +2 −0 fabfile/render.py
View
@@ -137,13 +137,9 @@ def deploy_all_data():
render.render_all()
deploy_data_folder()
@task
def deploy_top_level_numbers():
render.render_top_level_numbers()
local('aws s3 cp {0}/top-level-results.json s3://{1}/{2}/data/ --acl public-read --cache-control max-age=5'.format(app_config.DATA_OUTPUT_FOLDER, app_config.S3_BUCKET, app_config.PROJECT_SLUG))
@task
def deploy_data_folder():
local('aws s3 cp {0}/top-level-results.json s3://{1}/{2}/data/ --acl public-read --cache-control max-age=5'.format(app_config.DATA_OUTPUT_FOLDER, app_config.S3_BUCKET, app_config.PROJECT_SLUG))
local('aws s3 sync {0} s3://{1}/{2}/data/ --acl public-read --cache-control max-age=5'.format(app_config.DATA_OUTPUT_FOLDER, app_config.S3_BUCKET, app_config.PROJECT_SLUG))
View
@@ -40,13 +40,11 @@ def main(run_once=False):
if mode == 'fast':
logger.info('loading all national results')
execute('data.load_results', mode)
execute('deploy_top_level_numbers')
execute('deploy_national_data')
if mode == 'slow':
logger.info('loading all presidential results')
execute('data.load_results', mode)
execute('deploy_top_level_numbers')
execute('deploy_presidential_data')
if mode == 'fast':
View
@@ -565,6 +565,7 @@ def render_all():
@task
def render_all_national():
render_top_level_numbers()
render_presidential_state_results()
render_presidential_big_board()
render_senate_results()
@@ -575,6 +576,7 @@ def render_all_national():
@task
def render_presidential_files():
render_top_level_numbers()
render_presidential_state_results()
render_presidential_county_results()
render_presidential_big_board()

0 comments on commit 858c347

Please sign in to comment.