Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new variables allowing Postgres ports customization. #10

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions autoagora_processor/db_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
required=True,
help="URL of the postgres instance use by the graph-nodes.",
)
argsparser.add_argument(
"--graph-postgres-port",
env_var="GRAPH_POSTGRES_PORT",
required=True,
help="Port of the postgres instance use by the graph-nodes.",
)
argsparser.add_argument(
"--graph-postgres-database",
env_var="GRAPH_POSTGRES_DATABASE",
Expand All @@ -42,6 +48,7 @@ def get_indexed_subgraphs() -> Set[str]:
user=args.graph_postgres_username,
password=args.graph_postgres_password,
host=args.graph_postgres_host,
port=args.graph_postgres_port,
)
cur = conn.cursor()

Expand Down
3 changes: 2 additions & 1 deletion autoagora_processor/logs_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ def __init__(
user: str,
password: str,
host: str,
port: str,
) -> None:
self.conn = pg.connect(dbname=dbname, user=user, password=password, host=host)
self.conn = pg.connect(dbname=dbname, user=user, password=password, host=host, port=port)
self.conn.autocommit = True
self.cur = self.conn.cursor()

Expand Down
7 changes: 7 additions & 0 deletions autoagora_processor/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@
required=True,
help="Host of the postgres instance storing the logs.",
)
argsparser.add_argument(
"--postgres-port",
env_var="POSTGRES_PORT",
required=True,
help="Port of the postgres instance storing the logs.",
)
argsparser.add_argument(
"--postgres-database",
env_var="POSTGRES_DATABASE",
Expand Down Expand Up @@ -121,6 +127,7 @@
user=args.postgres_username,
password=args.postgres_password,
host=args.postgres_host,
port=args.postgres_port,
)

subgraph_schemas = SubgraphSchemas()
Expand Down