-
Notifications
You must be signed in to change notification settings - Fork 1
352 DB limitation #427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
352 DB limitation #427
Conversation
meta.save() | ||
|
||
def check_storage_limit(self, new_file_size): | ||
max_size = int(Config.c.constants.storage_max_size_mbytes)*1024*1024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Поскольку вы вынесли логику в DBManager - давайте лимит запишем в его поле (тогда не нужно будет каждый раз преобразовывать данные из конфига)
except: | ||
if(isinstance(file, str)): | ||
size = len(file) | ||
self.check_storage_limit(size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в случае, если БД переполнена - загрузка (и тренировка) должна быть прервана - иначе сейчас просто пишется сообщение в лог и логика идет дальше
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
кажется, в тестовом конфиге это тоже пригодится - как минимум, для selenium-теста, проверяющего страницу capacity
No description provided.