예제 #1
0
func Compile(rend render.Render, req *http.Request) {

	if master.IsLock() {
		rend.JSON(200, helper.Error(helper.BusyError))
		return
	}

	master.Lock()
	master.SetBusy()
	master.SetMessage("ready to compile")

	task.Trigger("master.Compile")
	rend.JSON(200, helper.Success())
}
예제 #2
0
func Update(rend render.Render, req *http.Request) {

	if master.IsLock() {
		rend.JSON(200, helper.Error(helper.BusyError))
		return
	}

	result, err := update()
	if err != nil {
		rend.JSON(200, helper.Error(err, result))
		return
	}

	rend.JSON(200, helper.Success(result))
}