pipen-cli-gbatch 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pipen-cli-gbatch might be problematic. Click here for more details.
- pipen_cli_gbatch/__init__.py +26 -7
- {pipen_cli_gbatch-0.1.0.dist-info → pipen_cli_gbatch-0.1.2.dist-info}/METADATA +1 -1
- pipen_cli_gbatch-0.1.2.dist-info/RECORD +6 -0
- pipen_cli_gbatch-0.1.0.dist-info/RECORD +0 -6
- {pipen_cli_gbatch-0.1.0.dist-info → pipen_cli_gbatch-0.1.2.dist-info}/WHEEL +0 -0
- {pipen_cli_gbatch-0.1.0.dist-info → pipen_cli_gbatch-0.1.2.dist-info}/entry_points.txt +0 -0
pipen_cli_gbatch/__init__.py
CHANGED
|
@@ -79,7 +79,7 @@ from pipen.cli import CLIPlugin
|
|
|
79
79
|
from pipen.scheduler import GbatchScheduler
|
|
80
80
|
from pipen_poplog import LogsPopulator
|
|
81
81
|
|
|
82
|
-
__version__ = "0.1.
|
|
82
|
+
__version__ = "0.1.2"
|
|
83
83
|
__all__ = ("CliGbatchPlugin", "CliGbatchDaemon")
|
|
84
84
|
MOUNTED_CWD = "/mnt/disks/.cwd"
|
|
85
85
|
|
|
@@ -200,6 +200,10 @@ class CliGbatchDaemon:
|
|
|
200
200
|
target: The target mount path inside the container.
|
|
201
201
|
"""
|
|
202
202
|
mount = self.config.get("mount", [])
|
|
203
|
+
if not isinstance(mount, (list, tuple, set)):
|
|
204
|
+
mount = [mount]
|
|
205
|
+
else:
|
|
206
|
+
mount = list(mount)
|
|
203
207
|
# mount the workdir
|
|
204
208
|
mount.append(f"{source}:{target}")
|
|
205
209
|
|
|
@@ -617,30 +621,45 @@ class XquteCliGbatchPlugin: # pragma: no cover
|
|
|
617
621
|
scheduler: The scheduler instance.
|
|
618
622
|
job: The job that started.
|
|
619
623
|
"""
|
|
620
|
-
logger.info("Job is picked up by Google Batch, pulling stdout/stderr...")
|
|
624
|
+
logger.info("Job is picked up by Google Batch, pulling stdout/stderr ...")
|
|
621
625
|
if not self.stdout_file:
|
|
622
626
|
self.stdout_populator.logfile = scheduler.workdir.joinpath(
|
|
623
627
|
"0", "job.stdout"
|
|
624
628
|
)
|
|
625
629
|
elif not self.stdout_file.exists():
|
|
626
|
-
|
|
630
|
+
logger.warning(f"Running logs file not found: {self.stdout_file}")
|
|
631
|
+
logger.warning(" Waiting for it to be created ...")
|
|
632
|
+
i = 0
|
|
633
|
+
while not self.stdout_file.exists():
|
|
634
|
+
await asyncio.sleep(3)
|
|
635
|
+
i += 1
|
|
636
|
+
if i >= 20:
|
|
637
|
+
break
|
|
638
|
+
|
|
627
639
|
if not self.stdout_file.exists():
|
|
628
|
-
logger.warning(f"Running logs not found: {self.stdout_file}")
|
|
629
640
|
logger.warning(
|
|
630
|
-
"
|
|
641
|
+
" Still not found, falling back to pull logs from daemon ..."
|
|
642
|
+
)
|
|
643
|
+
logger.warning(
|
|
644
|
+
" Make sure pipen-log2file plugin is enabled for your pipeline."
|
|
631
645
|
)
|
|
632
|
-
logger.warning("Falling back to pull logs from daemon...")
|
|
633
646
|
self.stdout_populator.logfile = scheduler.workdir.joinpath(
|
|
634
647
|
"0", "job.stdout"
|
|
635
648
|
)
|
|
636
649
|
else:
|
|
650
|
+
logger.info(" Found the running logs, pulling ...")
|
|
637
651
|
self.stdout_populator.logfile = (
|
|
638
652
|
self.stdout_file.resolve()
|
|
639
653
|
if self.stdout_file.is_symlink()
|
|
640
654
|
else self.stdout_file
|
|
641
655
|
)
|
|
642
656
|
else:
|
|
643
|
-
self.stdout_populator.logfile =
|
|
657
|
+
self.stdout_populator.logfile = (
|
|
658
|
+
self.stdout_file.resolve()
|
|
659
|
+
if self.stdout_file.is_symlink()
|
|
660
|
+
else self.stdout_file
|
|
661
|
+
)
|
|
662
|
+
|
|
644
663
|
self.stderr_populator.logfile = scheduler.workdir.joinpath("0", "job.stderr")
|
|
645
664
|
|
|
646
665
|
@plugin.impl
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
pipen_cli_gbatch/__init__.py,sha256=ubJcMPSaCBqYB8oirsVZ9ML5nfB2OOkkSu5TLVnDfTQ,32826
|
|
2
|
+
pipen_cli_gbatch/daemon_args.toml,sha256=XrCDwTaJ7xPgGLtZev4qikjrZWqixdE8tqSsFnIvmjc,7381
|
|
3
|
+
pipen_cli_gbatch-0.1.2.dist-info/METADATA,sha256=vIp0W23BlYCi7ghS-SX-OdpBIMdXDRDXD3GmfHA-IM0,11301
|
|
4
|
+
pipen_cli_gbatch-0.1.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
5
|
+
pipen_cli_gbatch-0.1.2.dist-info/entry_points.txt,sha256=Z9NLeCpRo-rb8wss5mB5TBcG-_RbdlPA49b8Ma5pvQA,57
|
|
6
|
+
pipen_cli_gbatch-0.1.2.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
pipen_cli_gbatch/__init__.py,sha256=e2nJIiWPFzlzNAbOxzTanCtXg0oot28HrxHpH7KGyxI,32264
|
|
2
|
-
pipen_cli_gbatch/daemon_args.toml,sha256=XrCDwTaJ7xPgGLtZev4qikjrZWqixdE8tqSsFnIvmjc,7381
|
|
3
|
-
pipen_cli_gbatch-0.1.0.dist-info/METADATA,sha256=sNcCQTI7p7ibwuWIFT-SQo8RT-gLbjlE8TO2Bv592Q0,11301
|
|
4
|
-
pipen_cli_gbatch-0.1.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
5
|
-
pipen_cli_gbatch-0.1.0.dist-info/entry_points.txt,sha256=Z9NLeCpRo-rb8wss5mB5TBcG-_RbdlPA49b8Ma5pvQA,57
|
|
6
|
-
pipen_cli_gbatch-0.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|