• Kirill Smelkov's avatar
    slaprunner: Make njobs calculation more explicit and simple · 318f4a05
    Kirill Smelkov authored
    Currently we use '%d' and string formatting on max(1, ncpu / cpu-usage-ratio),
    because `ncpu / cpu-usage-ratio` is float:
    
        In [1]: from __future__ import division
    
        In [2]: 8 / 4
        Out[2]: 2.0
    
    and jinja2 uses future division by default:
    
        {{ 8 / 4 }}   ->   2.0
    
    We can however make things more explicit, by explicitly using integer
    division (// operator) and this way avoid the need for '%d' and string
    formatting.
    
    /cc @jerome, @cedric.leninivin
    318f4a05
common.cfg 5.93 KB