Show More
@@ -68,12 +68,21 b' class Command(BasePasterCommand):' | |||
|
68 | 68 | repo_list = Repository.getAll() |
|
69 | 69 | RepoModel.update_repoinfo(repositories=repo_list) |
|
70 | 70 | Session().commit() |
|
71 | ||
|
72 | if self.options.invalidate_cache: | |
|
73 | for r in repo_list: | |
|
74 | r.invalidate | |
|
75 | Session().commit() | |
|
71 | 76 | log.info('Updated cache for %s repositories' % (len(repo_list))) |
|
72 | 77 | |
|
73 | 78 | def update_parser(self): |
|
74 | 79 | self.parser.add_option('--update-only', |
|
75 | action='store', | |
|
76 | dest='repo_update_list', | |
|
77 | help="Specifies a comma separated list of repositores " | |
|
78 |
"to update last commit info for. OPTIONAL" |
|
|
79 | ) | |
|
80 | action='store', | |
|
81 | dest='repo_update_list', | |
|
82 | help="Specifies a comma separated list of repositores " | |
|
83 | "to update last commit info for. OPTIONAL") | |
|
84 | self.parser.add_option('--invalidate-cache', | |
|
85 | action='store_true', | |
|
86 | dest='invalidate_cache', | |
|
87 | help="Trigger cache invalidation event for repos. " | |
|
88 | "OPTIONAL") |
General Comments 0
You need to be logged in to leave comments.
Login now