From 10f57efe506dd81d7630931d49c47d00beefb359 Mon Sep 17 00:00:00 2001
From: Vinicius Moreira
Date: Wed, 30 Dec 2020 15:25:08 -0300
Subject: [PATCH] [web] improvement -> environment.cache_exp in hours instead
of minutes
---
CHANGELOG.md | 6 +++---
README.md | 2 +-
bauh/gems/web/config.py | 2 +-
bauh/gems/web/environment.py | 2 +-
bauh/gems/web/resources/locale/ca | 2 +-
bauh/gems/web/resources/locale/en | 2 +-
bauh/gems/web/resources/locale/es | 2 +-
bauh/gems/web/resources/locale/fr | 2 +-
bauh/gems/web/resources/locale/it | 2 +-
bauh/gems/web/resources/locale/pt | 2 +-
bauh/gems/web/resources/locale/ru | 2 +-
bauh/gems/web/resources/locale/tr | 2 +-
12 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index af1ebab5..d664393f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -55,12 +55,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Web
- - now the environment settings are cached in disk for 24 hours. This period can be controlled through the new settings property **environment.cache_exp** (in minutes -> default: 1440 = 24 hours. Use **0** so that they are always updated).
+ - now the environment settings are cached in disk for 24 hours. This period can be controlled through the new settings property **environment.cache_exp** (in HOURS -> default: 24). Use **0** so that they are always updated).
+ - now the suggestions are cached in disk for 24 hours. This period can be controlled through the new settings property **suggestions.cache_exp** (in hours -> default: 24 hours. Use **0** so that they are always updated).
-
+
- - now the suggestions are cached in disk for 24 hours. This period can be controlled through the new settings property **suggestions.cache_exp** (in hours -> default: 24 hours. Use **0** so that they are always updated).
- displaying the "Indexing suggestions" task during the initialization process
- all types now display an initialization task "Checking configuration file" responsible to create/update the respective configuration file
diff --git a/README.md b/README.md
index 4e8a789d..11f66cfc 100644
--- a/README.md
+++ b/README.md
@@ -268,7 +268,7 @@ environment:
electron:
version: null # set a custom Electron version here (e.g: '6.1.4')
system: false # set it to 'true' if you want to use the nativefier version globally installed on your system
- cache_exp: 1440 # defines the period (in minutes) in which the stored environment settings are considered valid. Use 0 so that they are always updated. Default: 1440 (24 hours)
+ cache_exp: 24 # defines the period (in HOURS) in which the stored environment settings are considered valid. Use 0 so that they are always updated. Default: 24.
suggestions:
cache_exp: 24 # defines the period (in HOURS) in which suggestions stored on the disk are considered up to date during the initialization process. Use 0 so that they are always updated. Default: 24.
diff --git a/bauh/gems/web/config.py b/bauh/gems/web/config.py
index 19846c1f..50852b04 100644
--- a/bauh/gems/web/config.py
+++ b/bauh/gems/web/config.py
@@ -12,7 +12,7 @@ class WebConfigManager(YAMLConfigManager):
'environment': {
'system': False,
'electron': {'version': None},
- 'cache_exp': 1440
+ 'cache_exp': 24
},
'suggestions': {
'cache_exp': 24
diff --git a/bauh/gems/web/environment.py b/bauh/gems/web/environment.py
index fd0303c1..a7812952 100644
--- a/bauh/gems/web/environment.py
+++ b/bauh/gems/web/environment.py
@@ -303,7 +303,7 @@ class EnvironmentUpdater:
self.logger.error("Could not parse environment settings file timestamp: {}".format(env_ts_str))
return True
- expired = env_timestamp + timedelta(minutes=settings_exp) <= datetime.utcnow()
+ expired = env_timestamp + timedelta(hours=settings_exp) <= datetime.utcnow()
if expired:
self.logger.info("Environment settings file has expired. It should be re-downloaded")
diff --git a/bauh/gems/web/resources/locale/ca b/bauh/gems/web/resources/locale/ca
index afd1879f..8132eeda 100644
--- a/bauh/gems/web/resources/locale/ca
+++ b/bauh/gems/web/resources/locale/ca
@@ -63,7 +63,7 @@ web.install.substatus.checking_fixes=Checking if there are published fixes
web.install.substatus.options=Waiting for the installation options
web.install.substatus.shortcut=Generating a menu shortcut
web.settings.cache_exp=Environment settings expiration
-web.settings.cache_exp.tip=It defines the period (in minutes) in which the stored environment settings are considered valid. Use 0 so that they are always updated.
+web.settings.cache_exp.tip=It defines the period (in HOURS) in which the stored environment settings are considered valid. Use 0 so that they are always updated.
web.settings.electron.version.label=Electron version
web.settings.electron.version.tooltip=Defines an alternative Electron version to render the new installed apps
web.settings.env.nativefier.system.not_installed={} seems not to be installed on your system
diff --git a/bauh/gems/web/resources/locale/en b/bauh/gems/web/resources/locale/en
index 18273835..40d71c09 100644
--- a/bauh/gems/web/resources/locale/en
+++ b/bauh/gems/web/resources/locale/en
@@ -63,7 +63,7 @@ web.install.substatus.checking_fixes=Checking if there are published fixes
web.install.substatus.options=Waiting for the installation options
web.install.substatus.shortcut=Generating a menu shortcut
web.settings.cache_exp=Environment settings expiration
-web.settings.cache_exp.tip=It defines the period (in minutes) in which the stored environment settings are considered valid. Use 0 so that they are always updated.
+web.settings.cache_exp.tip=It defines the period (in HOURS) in which the stored environment settings are considered valid. Use 0 so that they are always updated.
web.settings.electron.version.label=Electron version
web.settings.electron.version.tooltip=Defines an alternative Electron version to render the new installed apps
web.settings.env.nativefier.system.not_installed={} seems not to be installed on your system
diff --git a/bauh/gems/web/resources/locale/es b/bauh/gems/web/resources/locale/es
index 954867e2..2d9f61a0 100644
--- a/bauh/gems/web/resources/locale/es
+++ b/bauh/gems/web/resources/locale/es
@@ -63,7 +63,7 @@ web.install.substatus.checking_fixes=Verificando si hay correcciones publicadas
web.install.substatus.options=Esperando las opciones de instalación
web.install.substatus.shortcut=Generando un atajo de menú
web.settings.cache_exp=Expiración de configuraciones de ambiente
-web.settings.cache_exp.tip=Define el período (en minutos) en el que las configuraciones del ambiente almacenadas son consideradas válidas. Utilice 0 para que siempre sean actualizadas.
+web.settings.cache_exp.tip=Define el período (en HORAS) en el que las configuraciones del ambiente almacenadas son consideradas válidas. Utilice 0 para que siempre sean actualizadas.
web.settings.electron.version.label=Versión del Electron
web.settings.electron.version.tooltip=Define una versión alternativa del Electron para renderizar las nuevas aplicaciones instaladas
web.settings.env.nativefier.system.not_installed={} parece no estar instalado en su sistema
diff --git a/bauh/gems/web/resources/locale/fr b/bauh/gems/web/resources/locale/fr
index d65cef97..25674c98 100644
--- a/bauh/gems/web/resources/locale/fr
+++ b/bauh/gems/web/resources/locale/fr
@@ -63,7 +63,7 @@ web.install.substatus.checking_fixes=Verification de nouveaux correctifs disponi
web.install.substatus.options=En attente des options d'installation
web.install.substatus.shortcut=Génération d'un raccourci menu
web.settings.cache_exp=Environment settings expiration
-web.settings.cache_exp.tip=It defines the period (in minutes) in which the stored environment settings are considered valid. Use 0 so that they are always updated.
+web.settings.cache_exp.tip=It defines the period (in HOURS) in which the stored environment settings are considered valid. Use 0 so that they are always updated.
web.settings.electron.version.label=Version d'Electron
web.settings.electron.version.tooltip=Definit une version alternativde d'Electron pour le rendu des dernières apps installées
web.settings.env.nativefier.system.not_installed={} n'a pas l'air d'être installé sur votre système
diff --git a/bauh/gems/web/resources/locale/it b/bauh/gems/web/resources/locale/it
index afd1879f..8132eeda 100644
--- a/bauh/gems/web/resources/locale/it
+++ b/bauh/gems/web/resources/locale/it
@@ -63,7 +63,7 @@ web.install.substatus.checking_fixes=Checking if there are published fixes
web.install.substatus.options=Waiting for the installation options
web.install.substatus.shortcut=Generating a menu shortcut
web.settings.cache_exp=Environment settings expiration
-web.settings.cache_exp.tip=It defines the period (in minutes) in which the stored environment settings are considered valid. Use 0 so that they are always updated.
+web.settings.cache_exp.tip=It defines the period (in HOURS) in which the stored environment settings are considered valid. Use 0 so that they are always updated.
web.settings.electron.version.label=Electron version
web.settings.electron.version.tooltip=Defines an alternative Electron version to render the new installed apps
web.settings.env.nativefier.system.not_installed={} seems not to be installed on your system
diff --git a/bauh/gems/web/resources/locale/pt b/bauh/gems/web/resources/locale/pt
index dd66cb73..96ad226a 100644
--- a/bauh/gems/web/resources/locale/pt
+++ b/bauh/gems/web/resources/locale/pt
@@ -62,7 +62,7 @@ web.install.substatus.checking_fixes=Verificando se há correções publicadas
web.install.substatus.options=Aguardando as opções de instalação
web.install.substatus.shortcut=Criando um atalho no menu
web.settings.cache_exp=Expiração das configurações de ambiente
-web.settings.cache_exp.tip=Define o período (em minutos) em que as configurações do ambiente de instalação armazenadas são consideradas válidas. Utilize 0 para que elas sejam sempre atualizadas.
+web.settings.cache_exp.tip=Define o período (em HORAS) em que as configurações do ambiente de instalação armazenadas são consideradas válidas. Utilize 0 para que elas sejam sempre atualizadas.
web.settings.electron.version.label=Versão do Electron
web.settings.electron.version.tooltip=Define uma versão alternativa do Electron para renderizar os novos aplicativos instalados
web.settings.env.nativefier.system.not_installed={} não parece estar instalado no seu sistema
diff --git a/bauh/gems/web/resources/locale/ru b/bauh/gems/web/resources/locale/ru
index e97c601f..c8224f9f 100644
--- a/bauh/gems/web/resources/locale/ru
+++ b/bauh/gems/web/resources/locale/ru
@@ -63,7 +63,7 @@ web.install.substatus.checking_fixes=Проверка опубликованны
web.install.substatus.options=Ожидание опций установки
web.install.substatus.shortcut=Создается ярлык в меню
web.settings.cache_exp=Environment settings expiration
-web.settings.cache_exp.tip=It defines the period (in minutes) in which the stored environment settings are considered valid. Use 0 so that they are always updated.
+web.settings.cache_exp.tip=It defines the period (in HOURS) in which the stored environment settings are considered valid. Use 0 so that they are always updated.
web.settings.electron.version.label=версия Electron
web.settings.electron.version.tooltip=Указывает альтернативный вариант Electron для визуализации устанавливаемых приложений
web.settings.env.nativefier.system.not_installed={} не установлен в Вашей системе
diff --git a/bauh/gems/web/resources/locale/tr b/bauh/gems/web/resources/locale/tr
index ac8dd89f..41120cf4 100644
--- a/bauh/gems/web/resources/locale/tr
+++ b/bauh/gems/web/resources/locale/tr
@@ -63,7 +63,7 @@ web.install.substatus.checking_fixes=Yayınlanmış düzeltmeler olup olmadığ
web.install.substatus.options=Kurulum seçenekleri bekleniyor
web.install.substatus.shortcut=Bir menü kısayolu oluşturuluyor
web.settings.cache_exp=Environment settings expiration
-web.settings.cache_exp.tip=It defines the period (in minutes) in which the stored environment settings are considered valid. Use 0 so that they are always updated.
+web.settings.cache_exp.tip=It defines the period (in HOURS) in which the stored environment settings are considered valid. Use 0 so that they are always updated.
web.settings.electron.version.label=Electron sürümü
web.settings.electron.version.tooltip=Yeni yüklenen uygulamaları oluşturmak için alternatif bir Elektron sürümü tanımlar
web.settings.env.nativefier.system.not_installed={} sisteminize kurulu değil gibi görünüyor