-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The purpose of these changes was primarily to enhance code readabilit…
…y and maintenance, and secondly to improve performance through caching. In `userservice.py`, a change was made on how `can_grow_service_pool` method's result is evaluated, from explicitly comparing it with `False` to a pythonic approach of using `not`. This makes the code cleaner and easier to read. In `service.py` file, a variable name was changed from `services_limit` to `userservices_limit_field`. It appears much more logical namewise as the variable deals with limiting the number of user services. In the `fixed/service.py` file, the code was refactored for readability and DRY (Don't Repeat Yourself) principle, avoiding code repetition by extracting a recurring pattern into a separate method called `_get_machines_field`. In `authenticator.py`, a caching mechanism was introduced. If an Authenticator object is already created and no update in values is needed, the existing Authenticator object is returned. This prevents unnecessary creation of new Authenticator objects, thereby improving performance. In the `managed_object_model.py` file, the instruction to clear the cache was removed. This coincides with the caching strategy introduced in `authenticator.py`. Lastly, in `OpenGnsys/service.py`, `services_limit` was renamed to `userservices_limit_field`, consistent with the changes in `service.py`, improving code consistency.
- Loading branch information
Showing
6 changed files
with
32 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters