fix default broke material and topping route
This commit is contained in:
parent
fb046dadf8
commit
d9a7961806
2 changed files with 17 additions and 2 deletions
|
|
@ -207,7 +207,12 @@ func (d *Data) GetRecipe(countryID, filename string) *models.Recipe {
|
|||
|
||||
// do check if match the current pointer
|
||||
if d.CurrentFile[countryID] == filename {
|
||||
d.taoLogger.Log.Debug("GetRecipe", zap.Any("FileMatchCurrent", "return from stored "+filename), zap.Any("CurrentFile", d.CurrentFile))
|
||||
d.taoLogger.Log.Debug("GetRecipe",
|
||||
zap.Any("FileMatchCurrent", "return from stored "+filename),
|
||||
zap.Any("CurrentFile", d.CurrentFile),
|
||||
zap.Any("countryID", countryID))
|
||||
|
||||
d.taoLogger.Log.Debug("CurrentRecipeOK?", zap.Any("CurrentRecipe", d.CurrentRecipe[countryID] != nil))
|
||||
|
||||
// make sure recipe vesion is equal
|
||||
currentConfig := d.CurrentRecipe[countryID].MachineSetting.ConfigNumber
|
||||
|
|
@ -259,6 +264,9 @@ func (d *Data) GetRecipe(countryID, filename string) *models.Recipe {
|
|||
|
||||
if cached_recipe != nil {
|
||||
d.taoLogger.Log.Debug("GetRecipe", zap.Any("Check on cached recipe invalid", cached_recipe == nil), zap.Any("test config number", cached_recipe.MachineSetting.ConfigNumber))
|
||||
// set to current
|
||||
d.CurrentRecipe[countryID] = cached_recipe
|
||||
return cached_recipe
|
||||
}
|
||||
|
||||
recipe, err := helpers.ReadRecipeFile(countryID, filename)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue