Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos.toolbox
Commits
e025bfd0
Commit
e025bfd0
authored
Jun 28, 2013
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
equeue: fix restart problem by removing socket
parent
72ae7f9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
slapos/equeue/__init__.py
slapos/equeue/__init__.py
+11
-4
No files found.
slapos/equeue/__init__.py
View file @
e025bfd0
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
##############################################################################
##############################################################################
import
argparse
import
argparse
import
errno
import
gdbm
import
gdbm
import
json
import
json
import
logging
import
logging
...
@@ -143,10 +144,16 @@ def main():
...
@@ -143,10 +144,16 @@ def main():
signal
.
signal
(
signal
.
SIGHUP
,
lambda
*
args
:
sys
.
exit
(
-
1
))
signal
.
signal
(
signal
.
SIGHUP
,
lambda
*
args
:
sys
.
exit
(
-
1
))
signal
.
signal
(
signal
.
SIGTERM
,
lambda
*
args
:
sys
.
exit
())
signal
.
signal
(
signal
.
SIGTERM
,
lambda
*
args
:
sys
.
exit
())
server
=
EqueueServer
(
socketpath
,
**
{
'equeue_options'
:
args
})
try
:
server
.
logger
.
info
(
"Starting server on %r"
,
socketpath
)
server
=
EqueueServer
(
socketpath
,
**
{
'equeue_options'
:
args
})
server
.
serve_forever
()
server
.
logger
.
info
(
"Starting server on %r"
,
socketpath
)
server
.
serve_forever
()
finally
:
try
:
os
.
remove
(
socketpath
)
except
OSError
,
e
:
if
e
.
errno
!=
errno
.
ENOENT
:
raise
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
main
()
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