mirror of
https://github.com/kennethreitz/changelogdash.git
synced 2026-06-05 23:10:17 +00:00
manager
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
|
||||
dashboard manager
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
This module contains the management functionality.
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
import redi
|
||||
|
||||
from flaskext.script import Manager
|
||||
|
||||
from dash import app, g, redis_connect
|
||||
|
||||
|
||||
manager = Manager(app)
|
||||
|
||||
app.test_request_context('/').push()
|
||||
redi.config.init(r=redis_connect())
|
||||
|
||||
|
||||
@manager.command
|
||||
def clear_db():
|
||||
|
||||
r = redis_connect()
|
||||
r.flushall()
|
||||
|
||||
|
||||
@manager.command
|
||||
def sync():
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
manager.run()
|
||||
Reference in New Issue
Block a user