GithubHelp home page GithubHelp logo

electris's Introduction

Copyright 2013 NPR. All rights reserved. No part of these materials may be reproduced, modified, stored in a retrieval system, or retransmitted, in any form or by any means, electronic, mechanical or otherwise, without prior written permission from NPR.

(Want to use this code? Send an email to [email protected]!)

electris

Server environment

The following environment variables must be defined:

  • DEPLOYMENT_TARGET ("production" to disable DEBUG mode)
  • AWS_ACCESS_KEY_ID (for boto)
  • AWS_SECRET_ACCESS_KEY (for boto)
  • AP_USERNAME (for FTP)
  • AP_PASSWORD (for FTP)

Polling data

From 2012 Associated Press FTP docs:

  • Data is updated every 4-6 minutes. (Verified with AP rep.)
  • Clients may connect once per minute.
  • Clients must disconnect after each request.

Cron jobs:

*/2 * * * * cd /home/ubuntu/apps/electris/repository && ../virtualenv/bin/fab production update_ap_data
* * * * * cd /home/ubuntu/apps/electris/repository && ../virtualenv/bin/fab production update_backchannel deploy_local_data backup_electris_db

Deploying from the Bitbucket backup repo

In the event Github is down, you can deploy from Bitbucket with the following:

git push bitbucket master
fab production master deploy:bitbucket

You must have had a user configured on Bitbucket for this to work!

electris's People

Contributors

alykat avatar brianboyer avatar dannydb avatar jeremyjbowers avatar onyxfish avatar sdotreppe avatar stiles avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.