Example #1
0
func environmentCleanup() {
	log.Debug("Cleaning up environment...")
	if lockFile != nil {
		util.UnlockFile(lockFile)
	}
	if logFile != nil {
		logFile.Close()
	}
	if r := recover(); r != nil {
		api.ResponseLogAndError(r)
		os.Exit(1)
	}
}
Example #2
0
func cleanup() {
	if r := recover(); r != nil {
		api.ResponseLogAndError(r)
		os.Exit(1)
	}
}