Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.extension
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.extension
Commits
6d8a9b72
There was a problem fetching the pipeline summary.
Commit
6d8a9b72
authored
7 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue-45' into 'master'
Fixed issue with the gc Closes
#45
See merge request
!57
parents
7518f6cb
a957d848
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!57
Fixed issue with the gc
Pipeline
#
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/extension/config.py
+5
-0
5 additions, 0 deletions
bob/extension/config.py
with
5 additions
and
0 deletions
bob/extension/config.py
+
5
−
0
View file @
6d8a9b72
...
@@ -9,6 +9,7 @@ import logging
...
@@ -9,6 +9,7 @@ import logging
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
loaded_configs
=
[]
def
_load_context
(
path
,
mod
):
def
_load_context
(
path
,
mod
):
'''
Loads the Python file as module, returns a resolved context
'''
Loads the Python file as module, returns a resolved context
...
@@ -77,4 +78,8 @@ def load(paths, context=None):
...
@@ -77,4 +78,8 @@ def load(paths, context=None):
logger
.
debug
(
"
Loading configuration file `%s
'
...
"
,
k
)
logger
.
debug
(
"
Loading configuration file `%s
'
...
"
,
k
)
mod
=
_load_context
(
k
,
mod
)
mod
=
_load_context
(
k
,
mod
)
# Small gambiarra (https://www.urbandictionary.com/define.php?term=Gambiarra)
# to avoid the gc to collect some already imported modules
loaded_configs
.
append
(
mod
)
return
mod
return
mod
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment