Kaynağa Gözat

start event is called everytime a new step starts. So a new value for "active_brew" will only be generated if the value before was "none". The value is "none" either after initializing the app or after the process got stopped. That leaves one potentiall error: if a process is started and the app needs a restart. In this case a new value for "active_brew" would be unecessarily generated.

pull/194/head
Johannes 7 yıl önce
ebeveyn
işleme
b89dc3a4c3
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. +2
    -1
      modules/steps/__init__.py

+ 2
- 1
modules/steps/__init__.py Dosyayı Görüntüle

@@ -146,7 +146,8 @@ class StepView(BaseView):

@route('/start', methods=['POST'])
def start(self):
cbpi.cache["active_brew"] = cbpi.cache["config"]["brew_name"].__dict__["value"] + \
if "none" == cbpi.cache["active_brew"]:
cbpi.cache["active_brew"] = cbpi.cache["config"]["brew_name"].__dict__["value"] + \
"_" + datetime.datetime.now().strftime('%y-%m-%dT%H:%M')
return self.next()



Yükleniyor…
İptal
Kaydet