Преглед на файлове

HUE-2984 [core] Warn about SQLite DB when more than a few users exist

krish преди 10 години
родител
ревизия
1920319026
променени са 1 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 4 3
      desktop/core/src/desktop/conf.py

+ 4 - 3
desktop/core/src/desktop/conf.py

@@ -1082,7 +1082,7 @@ def validate_ldap(user, config):
 
 
   return res
   return res
 
 
-def validate_mysql_storage():
+def validate_database():
 
 
   from django.db import connection
   from django.db import connection
 
 
@@ -1113,7 +1113,8 @@ def validate_mysql_storage():
                                                         storage engine type (preferably InnoDB).'''))))
                                                         storage engine type (preferably InnoDB).'''))))
       except Exception, ex:
       except Exception, ex:
         LOG.exception("Error in config validation of MYSQL_STORAGE_ENGINE: %s", ex)
         LOG.exception("Error in config validation of MYSQL_STORAGE_ENGINE: %s", ex)
-
+  elif 'sqlite' in connection.vendor:
+    res.append(('SQLITE_NOT_FOR_PRODUCTION_USE', unicode(_('SQLite is only recommended for small development environments with a few users.'))))
   return res
   return res
 
 
 
 
@@ -1161,7 +1162,7 @@ def config_validator(user):
     res.extend(validate_ldap(user, LDAP))
     res.extend(validate_ldap(user, LDAP))
 
 
   # Validate MYSQL storage engine of all tables
   # Validate MYSQL storage engine of all tables
-  res.extend(validate_mysql_storage())
+  res.extend(validate_database())
 
 
   return res
   return res