Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CouchPotatoServer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
CouchPotatoServer
Commits
7cc55c21
Commit
7cc55c21
authored
Jan 22, 2013
by
Ruud
Browse files
Options
Downloads
Patches
Plain Diff
Shutdown cleanly on quit process
parent
89c38f5a
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
CouchPotato.py
+1
-2
1 addition, 2 deletions
CouchPotato.py
couchpotato/core/_base/_core/main.py
+3
-1
3 additions, 1 deletion
couchpotato/core/_base/_core/main.py
couchpotato/core/_base/scheduler/main.py
+0
-1
0 additions, 1 deletion
couchpotato/core/_base/scheduler/main.py
with
4 additions
and
4 deletions
CouchPotato.py
+
1
−
2
View file @
7cc55c21
...
...
@@ -62,7 +62,6 @@ class Loader(object):
self
.
log
.
logger
.
addHandler
(
hdlr
)
def
addSignals
(
self
):
signal
.
signal
(
signal
.
SIGINT
,
self
.
onExit
)
signal
.
signal
(
signal
.
SIGTERM
,
lambda
signum
,
stack_frame
:
sys
.
exit
(
1
))
...
...
@@ -74,7 +73,7 @@ class Loader(object):
def
onExit
(
self
,
signal
,
frame
):
from
couchpotato.core.event
import
fireEvent
fireEvent
(
'
app.
crappy_
shutdown
'
,
single
=
True
)
fireEvent
(
'
app.shutdown
'
,
single
=
True
)
def
run
(
self
):
...
...
This diff is collapsed.
Click to expand it.
couchpotato/core/_base/_core/main.py
+
3
−
1
View file @
7cc55c21
...
...
@@ -10,6 +10,7 @@ from uuid import uuid4
import
os
import
platform
import
signal
import
sys
import
time
import
traceback
import
webbrowser
...
...
@@ -178,6 +179,7 @@ class Core(Plugin):
def
signalHandler
(
self
):
def
signal_handler
(
signal
,
frame
):
fireEvent
(
'
app.
do_
shutdown
'
)
fireEvent
(
'
app.shutdown
'
)
signal
.
signal
(
signal
.
SIGINT
,
signal_handler
)
signal
.
signal
(
signal
.
SIGTERM
,
signal_handler
)
This diff is collapsed.
Click to expand it.
couchpotato/core/_base/scheduler/main.py
+
0
−
1
View file @
7cc55c21
...
...
@@ -2,7 +2,6 @@ from apscheduler.scheduler import Scheduler as Sched
from
couchpotato.core.event
import
addEvent
from
couchpotato.core.logger
import
CPLog
from
couchpotato.core.plugins.base
import
Plugin
import
logging
log
=
CPLog
(
__name__
)
...
...
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