Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #9 Fixes spantaleev/matrix-docker-ansible-deploy#2953 This matches more closely what this logic does: https://github.com/le0pard/pgtune/blob/master/src/features/configuration/configurationSlice.js This better suits 1 CPU systems, on which dividing the number of CPUs by 2 yields "workers = 0.5", which may later be rounded by ` | int` to 0 on some systems. Ending up with `0` causes a few problems: - division by zero when calculating some other variables - possibly setting workers = 0, which doesn't make sense I personally couldn't reproduce the division by zero problem, as `0.5 | int` seems to be rounded up to `1` on my system. Perhaps this behaves differently on other Ansible / Jinja2 versions or Python interpreter versions, etc. Nevertheless, with this patch, it should be safe everywhere.
- Loading branch information