Skip to content

Commit

Permalink
Merge pull request #6 from lsst-ts/tickets/DM-47705
Browse files Browse the repository at this point in the history
DM-47705: Fix credentials to match server and database in worker script
  • Loading branch information
fred3m authored Nov 21, 2024
2 parents 46d8afd + 157525d commit 0388e59
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/rubintv_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ def main():
default="WARNING",
help="Set the logging level of the remainder of packages (DEBUG, INFO, WARNING, ERROR, CRITICAL).",
)
parser.add_argument(
"--database",
default="exposurelog",
help="The name of the database to connect to."
"It will likely never need to be changed, but including it as an option just in case.",
)
args = parser.parse_args()

# Configure logging for all modules
Expand Down Expand Up @@ -132,7 +138,7 @@ def main():
credentials = file.readlines()
for credential in credentials:
_server, _, database, user, password = credential.split(":")
if _server == server:
if _server == server and database == args.database:
password = password.strip()
break
else:
Expand Down

0 comments on commit 0388e59

Please sign in to comment.