From 4cef7a0e784696cd5967e9d7452a09caafe4181a Mon Sep 17 00:00:00 2001 From: TimNekk Date: Mon, 2 May 2022 13:14:06 +0300 Subject: [PATCH 1/2] timings changed --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index a375e93..5e350de 100644 --- a/app.py +++ b/app.py @@ -43,4 +43,4 @@ def update(self): schedule.every(3).hours.do(app.update) while True: schedule.run_pending() - sleep(10) + sleep(1) From a2ed321d883b50d2bd17fce9a880fcf9f8d715e9 Mon Sep 17 00:00:00 2001 From: TimNekk Date: Mon, 2 May 2022 13:14:20 +0300 Subject: [PATCH 2/2] Out of stock message added --- sheets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sheets.py b/sheets.py index 2833437..6d15137 100644 --- a/sheets.py +++ b/sheets.py @@ -14,5 +14,5 @@ def get_urls(self) -> List[str]: return self.sheet.col_values(2) def set_quantities(self, quantities: List[int]): - cells = tuple(map(lambda x: [x], quantities)) + cells = tuple(map(lambda x: ["Нет в наличии"] if x == -1 else [x], quantities)) self.sheet.update("A1", cells)