Skip to content

giblet22/osm-stats-workers

This branch is 3 commits behind AmericanRedCross/osm-stats-workers:develop.

Folders and files

NameName
Last commit message
Last commit date
Feb 11, 2016
Jan 13, 2016
Oct 7, 2016
Sep 22, 2016
Jul 26, 2016
Jan 11, 2016
Jan 11, 2016
Feb 19, 2016
Apr 19, 2016
Mar 7, 2016
Feb 18, 2016
Mar 7, 2016
Apr 18, 2016
Apr 18, 2016
Feb 8, 2016

Repository files navigation

osm-stats-workers

Contains the data processing workers used to calculate metrics tracked by the OSM-Stats from OSM changeset JSON. Calculations are stored in a database to be accessed via an API connected to the front end site.

Each metric which requires calculation rather than a simple lookup should be saved as a function in src/metrics, with common components in src/common. Each function should be given a test in the test directory.

The database ORM is Bookshelf.js. To initialize the database schema, first install knex with cli

npm install knex -g -s

then run

knex migrate:latest

from the src/db/migrations directory.

Additional timestamped migration templates can be generated using

knex migrate:make migration_name

The database includes seed data which is necessary for proper operation of the workers. To seed the database, run

knex seed:run

from the src/db/migrations directory.

For testing purposes, the database can be completely removed, rebuilt and reseeded by running

npm run dbinit

from the project's root directory.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.0%
  • Shell 1.0%