Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • bitia/bitia-cli
1 result
Show changes
Commits on Source (2)
...@@ -8,7 +8,7 @@ import validators ...@@ -8,7 +8,7 @@ import validators
BITIA_MAIN_SCRIPT_NAME: T.Final[str] = "__main__.bitia.sh" BITIA_MAIN_SCRIPT_NAME: T.Final[str] = "__main__.bitia.sh"
_config = {"server": "https://public.bitia.link/api/v1"} _config = {"server": "https://subcom.bitia.link/api/v1"}
def set_config(key, val): def set_config(key, val):
......
...@@ -6,6 +6,7 @@ __email__ = "dilawar@subcom.tech" ...@@ -6,6 +6,7 @@ __email__ = "dilawar@subcom.tech"
import sys import sys
from pathlib import Path from pathlib import Path
import typing as T import typing as T
from urllib.parse import urlparse
import requests import requests
...@@ -22,11 +23,6 @@ def log_container(container: str, server: str, *, timestamps: bool = False): ...@@ -22,11 +23,6 @@ def log_container(container: str, server: str, *, timestamps: bool = False):
yield line yield line
def _check_server_status(server: str) -> int:
res = requests.get(server)
return res.status_code
def post_pipeline_task( def post_pipeline_task(
pipeline: Pipeline, pipeline: Pipeline,
*, *,
...@@ -36,11 +32,6 @@ def post_pipeline_task( ...@@ -36,11 +32,6 @@ def post_pipeline_task(
**kwargs, **kwargs,
): ):
"""Submit to the api for a given endpoint and pipeline file""" """Submit to the api for a given endpoint and pipeline file"""
if (code := _check_server_status(server)) != 200:
logger.warning(
"%s may not be alive (status code: %s). Try other one?", server, code
)
sys.exit(1)
pipeline_zip = pipeline.zipfile pipeline_zip = pipeline.zipfile
numbytes = pipeline_zip.stat().st_size numbytes = pipeline_zip.stat().st_size
assert numbytes > 0 assert numbytes > 0
...@@ -99,11 +90,6 @@ def submit_job( ...@@ -99,11 +90,6 @@ def submit_job(
): ):
"""Submit job to the API and stream the output.""" """Submit job to the API and stream the output."""
numbytes = pipeline_zip.stat().st_size numbytes = pipeline_zip.stat().st_size
if (code := _check_server_status(server)) != 200:
logger.warning(
"%s may not be alive (status code: %s). Try other one?", server, code
)
sys.exit(1)
assert numbytes > 0 assert numbytes > 0
logger.info( logger.info(
"Submitting %s (size=%.2f KB) to the %s", "Submitting %s (size=%.2f KB) to the %s",
......