Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
8200e0c2
Commit
8200e0c2
authored
May 19, 2023
by
Aarni Koskela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor configure_sigint_handler out
parent
1482c893
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
webui.py
webui.py
+13
-9
No files found.
webui.py
View file @
8200e0c2
...
...
@@ -178,9 +178,22 @@ def validate_tls_options():
startup_timer
.
record
(
"TLS"
)
def
configure_sigint_handler
():
# make the program just exit at ctrl+c without waiting for anything
def
sigint_handler
(
sig
,
frame
):
print
(
f
'Interrupted with signal {sig} in {frame}'
)
os
.
_exit
(
0
)
if
not
os
.
environ
.
get
(
"COVERAGE_RUN"
):
# Don't install the immediate-quit handler when running under coverage,
# as then the coverage report won't be generated.
signal
.
signal
(
signal
.
SIGINT
,
sigint_handler
)
def
initialize
():
fix_asyncio_event_loop_policy
()
validate_tls_options
()
configure_sigint_handler
()
check_versions
()
extensions
.
list_extensions
()
...
...
@@ -237,15 +250,6 @@ def initialize():
startup_timer
.
record
(
"extra networks"
)
# make the program just exit at ctrl+c without waiting for anything
def
sigint_handler
(
sig
,
frame
):
print
(
f
'Interrupted with signal {sig} in {frame}'
)
os
.
_exit
(
0
)
if
not
os
.
environ
.
get
(
"COVERAGE_RUN"
):
# Don't install the immediate-quit handler when running under coverage,
# as then the coverage report won't be generated.
signal
.
signal
(
signal
.
SIGINT
,
sigint_handler
)
def
setup_middleware
(
app
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment