Changeset - c400f2fbf131
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-10-26 00:25:21
marcin@python-works.com
cleanup script walks recursive on dirs to find repos to cleanup
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/cleanup.py
Show inline comments
 
@@ -85,13 +85,14 @@ class CleanupCommand(BasePasterCommand):
 
        add_cache(config)
 
        engine = engine_from_config(config, 'sqlalchemy.db1.')
 
        init_model(engine)
 

	
 
        repos_location = RhodeCodeUi.get_repos_location()
 
        to_remove = []
 
        for loc in os.listdir(repos_location):
 
        for dn, dirs, f in os.walk(str(repos_location)):
 
            for loc in dirs:
 
            if REMOVED_REPO_PAT.match(loc):
 
                to_remove.append([loc, self._extract_date(loc)])
 

	
 
        #filter older than (if present)!
 
        now = datetime.datetime.now()
 
        older_than = self.options.older_than
0 comments (0 inline, 0 general)