Skip to content

Commit 24efe69

Browse files
committed
update batchtools to work with new env
1 parent d7c25af commit 24efe69

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

batchtools/batchtools.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import argparse
2-
import sys
32

43
from .basecommand import Command
54
from .basecommand import SubParserFactory
@@ -10,7 +9,6 @@
109
from .bq import GpuQueuesCommand
1110
from .br import CreateJobCommand
1211
from .bps import ListPodsCommand
13-
from .helpers import is_logged_in, is_on_project
1412

1513

1614
class BatchTools:
@@ -57,14 +55,14 @@ def run(self, args: list[str] | None = None):
5755

5856

5957
def main() -> None:
60-
if not is_logged_in():
61-
sys.exit(
62-
"You are not logged in to the oc cli. Retrieve the token using 'oc login --web' or retrieving the login token from the openshift UI."
63-
)
64-
if not is_on_project():
65-
sys.exit(
66-
"You are not on a project. For metric tracking, you must be on a project. Use oc project <project-name> to get on a project."
67-
)
58+
# if not is_logged_in():
59+
# sys.exit(
60+
# "You are not logged in to the oc cli. Retrieve the token using 'oc login --web' or retrieving the login token from the openshift UI."
61+
# )
62+
# if not is_on_project():
63+
# sys.exit(
64+
# "You are not on a project. For metric tracking, you must be on a project. Use oc project <project-name> to get on a project."
65+
# )
6866

6967
app = BatchTools()
7068
app.run()

batchtools/prom_metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
LONG_JOB_BUCKETS = (1, 2, 5, 10, 20, 30, 60, 120, 180, 300, 600, 900, float("inf"))
1919

20-
PUSHGATEWAY_ADDR = os.getenv("PUSHGATEWAY_ADDR", "pushgateway.ope-test.svc:9091")
20+
PUSHGATEWAY_ADDR = os.getenv("PUSHGATEWAY_ADDR", "pushgateway.pushgateway.svc:9091")
2121

2222

2323
def detect_instance() -> str:

0 commit comments

Comments
 (0)