Shards database, collecting shard repositories, releases and dependencies.
PostgreSQL databases needs to be created manually. Connection configuration is read from environment variables:
TEST_DATABASE_URL(only for running tests)
SENTRY_DSN(optional, for sending error reports to sentry)
Install database schema by running
make db test_db.
shards install to install dependencies.
shards build worker to build the worker executable.
bin/worker import_catalog: Reads repositories mentioned in
catalog/*.ymlfiles and synchronizes them with the database.
bin/worker sync_repos [hours [ratio]]: Synchronizes data from git repositories to database for all repositories not synced in the last
24) or never synced at all.
ratiospecifies the amount of outdated repositories being run in this job (default:
2.0 / hours). This enables an even distribution of batch sizes. Recommended to be run every hour.
bin/worker updated_metrics: Updates shard metrics in the database. Should be run once per day.
A web application for browsing the database is available at https://github.com/shardbox/shardbox-web
make test to execute the spec suite.
git checkout -b my-new-feature)
git commit -am 'Add some feature')
git push origin my-new-feature)