Skip to content

Commit

Permalink
Merge pull request #41 from MinaFoundation/fix-retry-batch-cast
Browse files Browse the repository at this point in the history
cast retry_count to int
  • Loading branch information
piotr-iohk authored Mar 20, 2024
2 parents 4e42b0f + a2fa4f9 commit 340e12a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
6 changes: 5 additions & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ def drop_database(ctx):

# Establishing connection to PostgreSQL server
conn = psycopg2.connect(
host=db_host, port=db_port, user=db_user, password=db_password
host=db_host,
port=db_port,
dbname="postgres",
user=db_user,
password=db_password,
)
conn.autocommit = True
cursor = conn.cursor()
Expand Down
2 changes: 1 addition & 1 deletion uptime_service_validation/coordinator/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def wait_until_batch_ends(self):
def advance_to_next_batch(self, next_bot_log_id):
"""Update the state so that it describes the next batch in line;
transitioning the state to the next loop pass."""
self.retrials_left = os.environ["RETRY_COUNT"]
self.retrials_left = int(os.environ["RETRY_COUNT"])
self.batch = self.batch.next(next_bot_log_id)
self.__warn_if_work_took_longer_then_expected()
self.__next_loop()
Expand Down
9 changes: 0 additions & 9 deletions uptime_service_validation/coordinator/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ def setUpValidatorPods(time_intervals, logging, worker_image, worker_tag):
name="CASSANDRA_PASSWORD",
value=os.environ.get("CASSANDRA_PASSWORD"),
),
client.V1EnvVar(name="CASSANDRA_USE_SSL", value="1"),
client.V1EnvVar(
name="SSL_CERTFILE",
value="/root/.cassandra/sf-class2-root.crt",
Expand Down Expand Up @@ -280,9 +279,6 @@ def setUpValidatorProcesses(time_intervals, logging, worker_image, worker_tag):
command = [
"docker",
"run",
# "--privileged",
# "--network",
# "host",
"--rm",
"-v",
f"{os.environ.get('SSL_CERTFILE')}:/var/ssl/ssl-cert.crt",
Expand All @@ -308,12 +304,7 @@ def setUpValidatorProcesses(time_intervals, logging, worker_image, worker_tag):
"NETWORK_NAME",
"-e",
"SSL_CERTFILE=/var/ssl/ssl-cert.crt",
"-e",
"CASSANDRA_USE_SSL=1",
image,
# "cassandra",
# "--keyspace",
# os.environ.get("AWS_KEYSPACE"),
f"{datetime_formatter(mini_batch[0])}",
f"{datetime_formatter(mini_batch[1])}",
]
Expand Down

0 comments on commit 340e12a

Please sign in to comment.