def GET ( self ): global feeder if not feeder.is_alive(): feeder = Process( target=smf.feeder.run, args=( constants.DEFAULT_CONFIG, ) ) feeder.daemon = True feeder.start() session.set_flash = "Feeder Started" else: session.set_flash = "Feeder Already Running" raise web.seeother( '/' )
def feeder_loadhook (): session.feeder = feeder.is_alive()