Skip to content

Commit

Permalink
Temporarily remove data warehouse config export
Browse files Browse the repository at this point in the history
  • Loading branch information
danpalmer committed Jan 16, 2018
1 parent 2e91adc commit d8a33d8
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 870 deletions.
3 changes: 0 additions & 3 deletions routemaster/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from routemaster.config import ConfigError, load_config
from routemaster.server import server
from routemaster.validation import ValidationError, validate_config
from routemaster.record_states import record_state_machines
from routemaster.gunicorn_application import GunicornWSGIApplication

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -92,8 +91,6 @@ def serve(ctx, bind, debug): # pragma: no cover
if debug:
server.config['DEBUG'] = True

record_state_machines(app, app.config.state_machines.values())

cron_thread = CronThread(app)
cron_thread.start()

Expand Down
12 changes: 1 addition & 11 deletions routemaster/db/__init__.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
"""Public Database interface."""

from routemaster.db.model import (
edges,
labels,
states,
history,
metadata,
state_machines,
)
from routemaster.db.model import labels, history, metadata
from routemaster.db.initialisation import initialise_db

__all__ = (
'edges',
'labels',
'states',
'history',
'metadata',
'state_machines',
'initialise_db',
)
54 changes: 0 additions & 54 deletions routemaster/db/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
Integer,
DateTime,
MetaData,
ForeignKey,
FetchedValue,
ForeignKeyConstraint,
func,
Expand Down Expand Up @@ -93,56 +92,3 @@
# Null indicates being deleted from a state machine
NullableColumn('new_state', String),
)


"""
Represents a state machine.
We serialise versions of the configuration into the database so that the
structure of the state machines can be exported to a data warehouse.
"""
state_machines = Table(
'state_machines',
metadata,

Column('id', Integer, primary_key=True, autoincrement=True),
Column('name', String),
Column('updated', DateTime(timezone=True)),
NullableColumn('deleted', DateTime(timezone=True)),
)


"""Represents a state in a state machine."""
states = Table(
'states',
metadata,

Column('id', Integer, primary_key=True, autoincrement=True),
Column('name', String),
Column(
'state_machine_id',
Integer,
ForeignKey('state_machines.id'),
),

NullableColumn('exit_condition', String),
NullableColumn('webhook', String),

Column('updated', DateTime(timezone=True)),
NullableColumn('deleted', DateTime(timezone=True)),
)


"""Represents an edge between states in a state machine."""
edges = Table(
'edges',
metadata,
Column('id', Integer, primary_key=True, autoincrement=True),

Column('state_machine_id', ForeignKey('states.id')),
Column('from_state_id', ForeignKey('states.id')),
Column('to_state_id', ForeignKey('states.id')),

Column('updated', DateTime(timezone=True)),
NullableColumn('deleted', DateTime(timezone=True)),
)
7 changes: 0 additions & 7 deletions routemaster/record_states/__init__.py

This file was deleted.

63 changes: 0 additions & 63 deletions routemaster/record_states/api.py

This file was deleted.

Loading

0 comments on commit d8a33d8

Please sign in to comment.