def monitor_comments(): from myapp.config import config from myapp.lib.monitor import Monitor make_app() username = config.get('Reddit', 'username') password = config.get('Reddit', 'password') m = Monitor(username=username, password=password, delay=10) m.monitor_comments()
def monitor_posts(): from myapp.config import config from myapp.lib.monitor import Monitor make_app() username = config.get("Reddit", "username") password = config.get("Reddit", "password") m = Monitor(username=username, password=password, delay=150) m.monitor_posts()
def cleandb(): from myapp.lib.monitor import Monitor make_app() m = Monitor() m.cleandb()
def cleandb(request): rm = Monitor() rm.cleandb() return serve_text('db cleaned: ' + datetime.now().isoformat(' '))