Sfoglia il codice sorgente

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 anni fa
parent
commit
b89dc3a4c3
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. +2
    -1
      modules/steps/__init__.py

+ 2
- 1
modules/steps/__init__.py Vedi File

@@ -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()



Loading…
Annulla
Salva