mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: archive modules in size order until limit is hit (#21773)
Archiving modules attempts to save as many modules as it can before it hits the limit. Enabling the template as much as it can, rather than a hard failure.
This commit is contained in:
@@ -41,3 +41,7 @@ func (l *LimitWriter) Write(p []byte) (int, error) {
|
||||
l.N += int64(n)
|
||||
return n, err
|
||||
}
|
||||
|
||||
func (l *LimitWriter) Remaining() int64 {
|
||||
return l.Limit - l.N
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user