package main

import (
	_ "jy/admin"
	_ "jy/admin/audit"
	_ "jy/admin/distribution"
	_ "jy/admin/task"
	"jy/extract"
	_ "jy/front"
	. "jy/router"
	"jy/util"
	"log"
	qu "qfw/util"
	redis "qfw/util/redis"
)

func init() {
	qu.ReadConfig(&util.Config)
	util.InitMgoPool()
	redis.InitRedisBySize(qu.ObjToString(util.Config["redis"]), 50, 30, 240)
}

func main() {
	extract.ExtractUdp() //udp通知抽取
	go extract.Export()
	go Router.Run(":" + qu.ObjToString(util.Config["port"]))
	go log.Println("启动..", qu.ObjToString(util.Config["port"]))
	lock := make(chan bool)
	<-lock
}
