- Add a log entry for repo verb handling and make the container usage calculation take it into account
- Move all the repo push/pull/verb logging into a central track_and_log method - Readd images accidentally deleted in the last CL - Make the uncompressed size migration script better handle exceptions
This commit is contained in:
parent
c65031eea5
commit
c1398c6d2b
18 changed files with 216 additions and 85 deletions
|
@ -2226,7 +2226,10 @@ def confirm_team_invite(code, user):
|
|||
|
||||
def get_repository_usage():
|
||||
repo_pull = LogEntryKind.get(name = 'pull_repo')
|
||||
return (LogEntry.select().where(LogEntry.kind == repo_pull, ~(LogEntry.repository >> None))
|
||||
repo_verb = LogEntryKind.get(name = 'repo_verb')
|
||||
return (LogEntry.select()
|
||||
.where((LogEntry.kind == repo_pull) | (LogEntry.kind == repo_verb))
|
||||
.where(~(LogEntry.repository >> None))
|
||||
.group_by(LogEntry.ip)
|
||||
.group_by(LogEntry.repository)
|
||||
.count())
|
||||
|
|
Reference in a new issue