首页 \ 问答 \ CircleCI 4G内存泄漏 - Django迁移(CircleCI 4G memory breach - Django migrations)

CircleCI 4G内存泄漏 - Django迁移(CircleCI 4G memory breach - Django migrations)

我们正在为我们的Django / Python项目使用circleci。 虽然测试数据库正在作为TransactionTestCase的一部分进行设置,但内存开销高达~3g,因此突破了我们圈子ci环境的4g限制。 我使用ssh进行调试,发现一些测试并行运行,其中4g限制被破坏,因此循环ci构建失败。

在为测试设置数据库时,是否有减少内存占用的好方法?

任何帮助将不胜感激!


We are using circleci for our Django/Python project. While the test database is being setup as part of TransactionTestCase, the memory shoots up to ~3g and hence breaching the 4g limit of our circle ci environment. I debugged using ssh and found that some tests run in parallel where the 4g limit is breached and hence circle ci build fails.

Is there a good way to reduce the memory footprint while setting up databases for tests?

Any help will be greatly appreciated!


原文:https://stackoverflow.com/questions/43805063
更新时间:2022-01-03 20:01

最满意答案

我想你可以这样做:

ng-click="employee.nameEditor = undefined; 
employee.nameEditing = undefined;

如果您使用$ http角度服务将请求作为后端,它将自动消除具有未定义值的字段。


I think you can just do this:

ng-click="employee.nameEditor = undefined; 
employee.nameEditing = undefined;

and if you are using $http angular service to make the request to back end, it will automatically eliminate the fields with undefined values.

相关问答

更多