Skip to content

mcclatchy/outage-tracker

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Requirements

Instructions

Get the code

Clone the repo (or clone your own fork)

git clone git@github.com:mcclatchy/outage-tracker.git

Set up the environment

Make a virtual environment

mkvirtualenv outages

Install the requirements

pip3 install -r requirements.txt

Test the script

Run the following

python3 outages.py

After you've confirmed it worked by checking the CLI output and making sure the files are appearing on S3 at the given URLs, you can create a log file. For example:

touch /home/ubuntu/outage-tracker/outages.py

Then you're ready to set it up on a cron and direct the output to that log file. For example, run every 5 minutes (and depending on your environment, directory locations, etc):

*/5 * * * * /usr/bin/python3 /home/ubuntu/outage-tracker/outages.py >> /home/ubuntu/outage-tracker/outages.log

Questions? Contact glinch@mcclatchydc.com.

About

Python script to grab power outage data from FL and GL, then output to JSON and store on S3.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages