Skip to content

Commit

Permalink
Fix global config and Fix add_words (#634)
Browse files Browse the repository at this point in the history
* Fix postgresql-12 socket

* Fix add_words error duplicate key value
  • Loading branch information
lifeiteng committed May 17, 2023
1 parent c9c4022 commit 60c32ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions montreal_forced_aligner/command_line/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ def configure_pg(directory):
"#enable_partitionwise_join = off": "enable_partitionwise_join = on",
"#enable_partitionwise_aggregate = off": "enable_partitionwise_aggregate = on",
"#unix_socket_directories = ''": f"unix_socket_directories = '{GLOBAL_CONFIG.database_socket}'",
"#unix_socket_directories = '/var/run/postgresql'": f"unix_socket_directories = '{GLOBAL_CONFIG.database_socket}'",
"#unix_socket_directories = '/tmp'": f"unix_socket_directories = '{GLOBAL_CONFIG.database_socket}'",
"#listen_addresses = 'localhost'": "listen_addresses = ''",
"max_connections = 100": "max_connections = 1000",
Expand Down
2 changes: 1 addition & 1 deletion montreal_forced_aligner/dictionary/multispeaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ def add_words(
word_mapping = {}
pronunciation_mapping = []
word_index = self.get_next_primary_key(Word)
pronunciation_index = self.get_next_primary_key(Word)
pronunciation_index = self.get_next_primary_key(Pronunciation)
with self.session() as session:
word_mapping_index = (
session.query(sqlalchemy.func.max(Word.mapping_id))
Expand Down

0 comments on commit 60c32ca

Please sign in to comment.