Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bitia-cli
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bitia
bitia-cli
Compare revisions
3ee9da42e677ce70060e720c6107c4f62f0dc778 to c0c2a780e48b83be1a9b61debb9011da32ac6da9
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
bitia/bitia-cli
Select target project
No results found
c0c2a780e48b83be1a9b61debb9011da32ac6da9
Select Git revision
Swap
Target
bitia/bitia-cli
Select target project
bitia/bitia-cli
1 result
3ee9da42e677ce70060e720c6107c4f62f0dc778
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
feat: Use new default server subcom.bitia.link
· 8ae56cf2
dilawar
authored
2 years ago
8ae56cf2
Merge branch 'subcom.bitia.link' into 'main'
· c0c2a780
dilawar
authored
2 years ago
feat: Use new default server subcom.bitia.link See merge request
!23
c0c2a780
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bitia/config.py
+1
-1
1 addition, 1 deletion
bitia/config.py
bitia/helper.py
+1
-15
1 addition, 15 deletions
bitia/helper.py
with
2 additions
and
16 deletions
bitia/config.py
View file @
c0c2a780
...
...
@@ -8,7 +8,7 @@ import validators
BITIA_MAIN_SCRIPT_NAME
:
T
.
Final
[
str
]
=
"
__main__.bitia.sh
"
_config
=
{
"
server
"
:
"
https://
p
ub
lic
.bitia.link/api/v1
"
}
_config
=
{
"
server
"
:
"
https://
s
ub
com
.bitia.link/api/v1
"
}
def
set_config
(
key
,
val
):
...
...
This diff is collapsed.
Click to expand it.
bitia/helper.py
View file @
c0c2a780
...
...
@@ -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
"
,
...
...
This diff is collapsed.
Click to expand it.