mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 03:34:15 +02:00
[arch] improvement -> AUR index expiration is now defined in hours instead of minutes
This commit is contained in:
@@ -37,5 +37,5 @@ class ArchConfigManager(YAMLConfigManager):
|
||||
'check_dependency_breakage': True,
|
||||
'suggest_unneeded_uninstall': False,
|
||||
'suggest_optdep_uninstall': False,
|
||||
'aur_idx_exp': 720,
|
||||
'aur_idx_exp': 1,
|
||||
'categories_exp': 24}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=If, during the verification of upgrade
|
||||
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=If the PKGBUILD file of an AUR package should be displayed for editing before its installation/upgrade/downgrade
|
||||
arch.config.aur_idx_exp=Index expiration
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in minutes) for the AUR index stored in disc to be considered valid during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.mirrors_sort_limit=Mirrors sort limit
|
||||
arch.config.mirrors_sort_limit.tip=Defines the maximum number of mirrors that will be used for speed sorting. Use 0 for no limit or leave it blank to disable sorting.
|
||||
arch.config.optimize=Optimize {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=If, during the verification of upgrade
|
||||
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=If the PKGBUILD file of an AUR package should be displayed for editing before its installation/upgrade/downgrade
|
||||
arch.config.aur_idx_exp=Index expiration
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in minutes) for the AUR index stored in disc to be considered valid during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.mirrors_sort_limit=Mirrors sort limit
|
||||
arch.config.mirrors_sort_limit.tip=Defines the maximum number of mirrors that will be used for speed sorting. Use 0 for no limit or leave it blank to disable sorting.
|
||||
arch.config.optimize=Optimize {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=If, during the verification of upgrade
|
||||
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=If the PKGBUILD file of an AUR package should be displayed for editing before its installation/upgrade/downgrade
|
||||
arch.config.aur_idx_exp=Index expiration
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in minutes) for the AUR index stored in disc to be considered valid during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.mirrors_sort_limit=Mirrors sort limit
|
||||
arch.config.mirrors_sort_limit.tip=Defines the maximum number of mirrors that will be used for speed sorting. Use 0 for no limit or leave it blank to disable sorting.
|
||||
arch.config.optimize=Optimize {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=Si, durante la verificación de los re
|
||||
arch.config.edit_aur_pkgbuild=Editar PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=Si el archivo PKGBUILD de un paquete AUR debe ser exhibido para edición antes de su instalación/actualización/degradación
|
||||
arch.config.aur_idx_exp=Expiración del índice
|
||||
arch.config.aur_idx_exp.tip=Define el período (en minutos) para que el índice AUR almacenado en el disco se considere válido durante el proceso de inicialización. Utilice 0 para que esté siempre actualizado.
|
||||
arch.config.aur_idx_exp.tip=Define el período (en HORAS) en que el índice de AUR almacenado en el disco es considerado actualizado durante el proceso de inicialización. Utilice 0 para que sea siempre actualizado.
|
||||
arch.config.mirrors_sort_limit=Límite de ordenación de espejos
|
||||
arch.config.mirrors_sort_limit.tip=Define el número máximo de espejos que se utilizarán para la ordenación por velocidad. Use 0 para no limitar o déjelo en blanco para deshabilitar la clasificación.
|
||||
arch.config.optimize=Optimizar {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=Si, durant la vérification des prére
|
||||
arch.config.edit_aur_pkgbuild=Éditer PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=Si le fichier PKGBUILD d'un paquet AUR devrait être affiché pour édition avant installation/mise à jour/downgrade
|
||||
arch.config.aur_idx_exp=Index expiration
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in minutes) for the AUR index stored in disc to be considered valid during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.mirrors_sort_limit=Limite de tri des miroirs
|
||||
arch.config.mirrors_sort_limit.tip=Définit le nombre maximal de miroirs utilisés pour trier vite. 0 pour aucune limite ou vide pour désactiver le tri.
|
||||
arch.config.optimize=Optimizer {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=If, during the verification of upgrade
|
||||
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=If the PKGBUILD file of an AUR package should be displayed for editing before its installation/upgrade/downgrade
|
||||
arch.config.aur_idx_exp=Index expiration
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in minutes) for the AUR index stored in disc to be considered valid during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.mirrors_sort_limit=Mirrors sort limit
|
||||
arch.config.mirrors_sort_limit.tip=Defines the maximum number of mirrors that will be used for speed sorting. Use 0 for no limit or leave it blank to disable sorting.
|
||||
arch.config.optimize=Optimize {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=Se durante a verificação dos requisi
|
||||
arch.config.edit_aur_pkgbuild=Editar PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=Se o arquivo PKGBUILD de um pacote do AUR deve ser exibido para edição antes da instalação/atualização/reversão
|
||||
arch.config.aur_idx_exp=Expiração do índice
|
||||
arch.config.aur_idx_exp.tip=Define o período (em minutos) em que o índice do AUR armazenado em disco é considerado válido durante a inicialização. Utilize 0 para que ele sempre seja atualizado.
|
||||
arch.config.aur_idx_exp.tip=Define o período (em HORAS) em que o índice do AUR armazenado em disco é considerado atualizado durante a inicialização. Utilize 0 para que ele sempre seja atualizado.
|
||||
arch.config.mirrors_sort_limit=Limite de ordenação de espelhos
|
||||
arch.config.mirrors_sort_limit.tip=Define o número máximo de espelhos que serão utilizados para a ordenação por velocidade. Utilize 0 para não limitar ou deixe em branco para desabilitar a ordenação.
|
||||
arch.config.optimize=Otimizar {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=If, during the verification of upgrade
|
||||
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=If the PKGBUILD file of an AUR package should be displayed for editing before its installation/upgrade/downgrade
|
||||
arch.config.aur_idx_exp=Index expiration
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in minutes) for the AUR index stored in disc to be considered valid during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.mirrors_sort_limit=Ограничение сортировки зеркал
|
||||
arch.config.mirrors_sort_limit.tip=Определяет максимальное количество зеркал, которые будут использоваться для сортировки по скорости. Используйте 0 для No limit или оставьте его пустым, чтобы отключить сортировку.
|
||||
arch.config.optimize=Оптимизация {}
|
||||
|
||||
@@ -50,7 +50,7 @@ arch.config.check_dependency_breakage.tip=If, during the verification of upgrade
|
||||
arch.config.edit_aur_pkgbuild=Edit PKGBUILD (AUR)
|
||||
arch.config.edit_aur_pkgbuild.tip=If the PKGBUILD file of an AUR package should be displayed for editing before its installation/upgrade/downgrade
|
||||
arch.config.aur_idx_exp=Index expiration
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in minutes) for the AUR index stored in disc to be considered valid during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.aur_idx_exp.tip=It defines the period (in HOURS) for the AUR index stored in disc to be considered up to date during the initialization process. Use 0 so that it is always updated.
|
||||
arch.config.mirrors_sort_limit=Yansı sıralama sınırı
|
||||
arch.config.mirrors_sort_limit.tip=Hız sıralama için kullanılacak maksimum yansı sayısını tanımlar. Sınırsız olması için 0 kullanın veya sıralamayı devre dışı bırakmak için boş bırakın.
|
||||
arch.config.optimize=Optimize {}
|
||||
|
||||
@@ -45,12 +45,12 @@ class AURIndexUpdater(Thread):
|
||||
|
||||
def should_update(self) -> bool:
|
||||
try:
|
||||
exp_minutes = int(self.config['aur_idx_exp'])
|
||||
exp_hours = int(self.config['aur_idx_exp'])
|
||||
except:
|
||||
traceback.print_exc()
|
||||
return True
|
||||
|
||||
if exp_minutes <= 0:
|
||||
if exp_hours <= 0:
|
||||
return True
|
||||
|
||||
if not os.path.exists(AUR_INDEX_FILE):
|
||||
@@ -64,7 +64,7 @@ class AURIndexUpdater(Thread):
|
||||
|
||||
try:
|
||||
index_timestamp = datetime.fromtimestamp(float(timestamp_str))
|
||||
return (index_timestamp + timedelta(minutes=exp_minutes)) <= datetime.utcnow()
|
||||
return (index_timestamp + timedelta(hours=exp_hours)) <= datetime.utcnow()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user