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
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):
......
......@@ -6,6 +6,7 @@ __email__ = "dilawar@subcom.tech"
import sys
from pathlib import Path
import typing as T
from urllib.parse import urlparse
import requests
......@@ -22,11 +23,6 @@ def log_container(container: str, server: str, *, timestamps: bool = False):
yield line
def _check_server_status(server: str) -> int:
res = requests.get(server)
return res.status_code
def post_pipeline_task(
pipeline: Pipeline,
*,
......@@ -36,11 +32,6 @@ def post_pipeline_task(
**kwargs,
):
"""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
numbytes = pipeline_zip.stat().st_size
assert numbytes > 0
......@@ -99,11 +90,6 @@ def submit_job(
):
"""Submit job to the API and stream the output."""
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
logger.info(
"Submitting %s (size=%.2f KB) to the %s",
......