Skip to content

Commit

Permalink
Added __threads__ variable
Browse files Browse the repository at this point in the history
  • Loading branch information
AcerP-py committed May 3, 2024
1 parent 5f316bb commit c19d3ef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ def _build_image(self, unit: BuildUnit, src_image: str, name: str):
script_variables.update({'__name__': unit.node.name})
script_variables.update({'__tag__': unit.node.tag})
script_variables.update({'__timestamp__': datetime.datetime.now()})
script_variables.update({'__threads__': int(os.cpu_count() * 0.75) if int(os.cpu_count() * 0.75) < 16 else 16})
if src_image is not None:
script_variables.update({'__base__': src_image})

Expand Down

0 comments on commit c19d3ef

Please sign in to comment.