Skip to content

Commit

Permalink
Fix locking contention for #1697 (#1712)
Browse files Browse the repository at this point in the history
* Pull updating configs out of context

* Update CHANGELOG.md
  • Loading branch information
tylern4 authored Jun 27, 2023
1 parent 7e7bf51 commit 9a8e955
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- File transfer strategy for GCP storage
- Add CLI status for zombie, stopped process.
- Fix for double locking file in configurations.

### Docs

Expand Down
10 changes: 5 additions & 5 deletions covalent/_shared_files/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ def update_nested_dict(old_dict, new_dict, override_existing: bool = True):
fcntl.lockf(f, fcntl.LOCK_EX)
file_config = toml.load(f)

update_nested_dict(self.config_data, file_config)
if new_entries:
update_nested_dict(self.config_data, new_entries, override_existing)
update_nested_dict(self.config_data, file_config)
if new_entries:
update_nested_dict(self.config_data, new_entries, override_existing)

# Writing it back to the file
self.write_config()
# Writing it back to the file
self.write_config()

def read_config(self) -> None:
"""
Expand Down

0 comments on commit 9a8e955

Please sign in to comment.