Browse Source

Выполнение egencache через опцию

tags/3.2.1
Mike Khiretskiy 6 years ago
parent
commit
2cd55a701a
3 changed files with 27 additions and 3 deletions
  1. +2
    -2
      update/utils/cl_update.py
  2. +24
    -0
      update/variables/update.py
  3. +1
    -1
      update/wsdl_update.py

+ 2
- 2
update/utils/cl_update.py View File

@@ -239,8 +239,8 @@ class ClUpdateAction(Action):
'method': 'Update.regenCache(eachvar)',
'condition': (
lambda Get: (Get('cl_update_outdate_set') == 'on' and
Get('cl_update_metadata_force') != 'skip' or
Get('cl_update_metadata_force') == 'force'))
Get('cl_update_egencache_force') != 'skip' or
Get('cl_update_egencache_force') == 'force'))
},
{'name': 'sync_other_reps:regen_other_cache',
'foreach': 'cl_update_other_rep_name',


+ 24
- 0
update/variables/update.py View File

@@ -293,6 +293,30 @@ class VariableClUpdateMetadataForce(Variable):
("skip", _("Skip")),
("auto", _("If needed"))]


class VariableClUpdateEgencacheForce(Variable):
"""
Принудительное выполнение egencache
"""
type = "choice"
value = "auto"
opt = ["--egencache"]
syntax = "--{choice}-egencache"
metavalue = "MODE"
#untrusted = True

def init(self):
self.help = ("'force' - " + _("force the update overlays cache") +
",\n'skip' - " + _("skip the overlays cache update") +
",\n'auto' - " + _("update overlays cache if it is outdated"))
self.label = _("Update overlays cache")

def choice(self):
return [("force", _("Force")),
("skip", _("Skip")),
("auto", _("If needed"))]


class VariableClUpdateEixupdateForce(Variable):
"""
Принудительное действие с eix-update


+ 1
- 1
update/wsdl_update.py View File

@@ -67,7 +67,7 @@ class Wsdl(WsdlBase):
expert=(
'cl_rebuild_world_set', 'cl_update_rev_set',
'cl_update_sync_rep', 'cl_update_branch',
'cl_update_metadata_force',
'cl_update_egencache_force',
'cl_update_other_set',
'cl_update_pretend_set',
'cl_update_eixupdate_force',


Loading…
Cancel
Save