@task(aliases=['mongo'])
def mongoserver(ctx, daemon=False, config=None):
 if (not config):
  platform_configs = {'darwin': '/usr/local/etc/tokumx.conf', 'linux': '/etc/tokumx.conf'}
  platform = str(sys.platform).lower()
  config = platform_configs.get(platform)
 port = settings.DB_PORT
 cmd = 'mongod --port {0}'.format(port)
 if config:
  cmd += ' --config {0}'.format(config)
 if daemon:
  cmd += ' --fork'
 ctx.run(cmd, echo=True)

@ task ( aliases = [ 'mongo' ] ) def mongoserver ( ctx , daemon = False , config = None ) : if ( not config ) : platform_configs = { 'darwin' : '/usr/local/etc/tokumx.conf' , 'linux' : '/etc/tokumx.conf' } platform = str ( sys . platform ) . lower ( ) config = platform_configs . get ( platform ) port = settings . DB_PORT cmd = 'mongod --port {0}' . format ( port ) if config : cmd += ' --config {0}' . format ( config ) if daemon : cmd += ' --fork' ctx . run ( cmd , echo = True )
run the mongod process .