Update project, fix progress bars

This commit is contained in:
Ben 2022-03-18 15:08:56 +01:00
parent dab194fe1d
commit fa1596b57a
Signed by: ben
GPG key ID: 0F54A7ED232D3319
3 changed files with 10 additions and 8 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (podlaunch)" project-jdk-type="Python SDK" />
<component name="PythonCompatibilityInspectionAdvertiser">
<option name="version" value="3" />
</component>

View file

@ -2,7 +2,7 @@
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.10" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Python 3.10 (podlaunch)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View file

@ -78,8 +78,10 @@ def main():
image_tags.add(unit[len(search_str) :])
started_processes = []
with click.progressbar(image_units, label="Collecting container images..") as bar:
for image_service in bar:
with click.progressbar(
length=len(image_units), label="Collecting container images.."
) as bar:
for image_service in image_units:
process = systemctl.show(
image_service,
_out=process_image_systemctl_show,
@ -92,9 +94,9 @@ def main():
started_processes = []
with click.progressbar(
image_tags, label="Untagging container images..", show_pos=True
length=len(image_tags), label="Untagging container images..", show_pos=True
) as bar:
for image_tag in bar:
for image_tag in image_tags:
process = podman.untag(
image_tag,
_bg=True,
@ -112,9 +114,9 @@ def main():
started_processes = []
with click.progressbar(
image_units, label="Building images..", show_pos=True
length=len(image_units), label="Building images..", show_pos=True
) as bar:
for image_service in bar:
for image_service in image_units:
process = systemctl.restart(
image_service,
_bg=True,