Skip to content
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.

Commit

Permalink
database migration populate started applications
Browse files Browse the repository at this point in the history
  • Loading branch information
loomchild committed Feb 16, 2017
1 parent e34132a commit 726a55c
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""populate application_settings with started apps
Revision ID: f0c9c797c230
Revises: 31850461ed3
Create Date: 2017-02-16 01:02:02.951573
"""

# revision identifiers, used by Alembic.
revision = 'f0c9c797c230'
down_revision = '31850461ed3'

from alembic import op
import sqlalchemy as sa

from puffin.core import docker, applications

def upgrade():
running_applications = docker.get_all_running_applications()
for running_application in running_applications:
user = running_application[0]
application = running_application[1]
applications.set_application_started(user, application, True)

def downgrade():
pass

0 comments on commit 726a55c

Please sign in to comment.