Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sbws
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
juga
sbws
Commits
ea50a750
Commit
ea50a750
authored
6 years ago
by
juga
Browse files
Options
Downloads
Patches
Plain Diff
settings: add class to store end event singleton
parent
a6e4f06b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sbws/__init__.py
+24
-0
24 additions, 0 deletions
sbws/__init__.py
with
24 additions
and
0 deletions
sbws/__init__.py
+
24
−
0
View file @
ea50a750
__version__
=
'
1.0.3-dev0
'
import
threading
# noqa
class
Settings
:
"""
Singleton settings for all the packages.
This way change settings can be seen by all the packages that import it.
It lives in ``__init__.py`` to leave open the possibility of having a
``settings.py`` module for user settings.
.. note:: After refactoring, globals should only have constants.
Any other variable that needs to be modified when initializing
should be initialized here.
"""
def
__init__
(
self
):
self
.
end_event
=
threading
.
Event
()
def
set_end_event
(
self
):
self
.
end_event
.
set
()
settings
=
Settings
()
# noqa
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