Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
dcb873b7
Commit
dcb873b7
authored
Jan 18, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
WSGI: Start timerserver from wsgi script
See merge request
nexedi/erp5!1534
parents
f70bc102
78e9394f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
product/ERP5/bin/zopewsgi.py
product/ERP5/bin/zopewsgi.py
+8
-0
product/TimerService/timerserver/TimerServer.py
product/TimerService/timerserver/TimerServer.py
+3
-3
No files found.
product/ERP5/bin/zopewsgi.py
View file @
dcb873b7
...
...
@@ -158,6 +158,7 @@ def runwsgi():
parser
.
add_argument
(
'-w'
,
'--webdav'
,
action
=
'store_true'
)
parser
.
add_argument
(
'address'
,
help
=
'<ip>:<port>'
)
parser
.
add_argument
(
'zope_conf'
,
help
=
'path to zope.conf'
)
parser
.
add_argument
(
'--timerserver-interval'
,
help
=
'Interval for timerserver'
,
type
=
float
)
args
=
parser
.
parse_args
()
startup
=
os
.
path
.
dirname
(
Zope2
.
Startup
.
__file__
)
...
...
@@ -169,6 +170,13 @@ def runwsgi():
from
Signals.SignalHandler
import
SignalHandler
SignalHandler
.
registerHandler
(
signal
.
SIGTERM
,
sys
.
exit
)
if
args
.
timerserver_interval
:
import
Products.TimerService
Products
.
TimerService
.
timerserver
.
TimerServer
.
TimerServer
(
module
=
'Zope2'
,
interval
=
args
.
timerserver_interval
,
)
ip
,
port
=
splitport
(
args
.
address
)
port
=
int
(
port
)
createServer
(
...
...
product/TimerService/timerserver/TimerServer.py
View file @
dcb873b7
...
...
@@ -101,8 +101,8 @@ class TimerServer(threading.Thread):
err
=
StringIO
()
response
=
TimerResponse
(
out
,
err
)
handle
(
module
,
TimerRequest
(
response
,
interval
),
response
)
except
:
pass
except
Exception
:
logger
.
warn
(
"Ignoring exception in run loop"
,
exc_info
=
True
)
TIMER_SERVICE_PATH
=
'/Control_Panel/timer_service'
...
...
@@ -110,7 +110,7 @@ TIMER_ENVIRON = {
'REQUEST_METHOD'
:
'GET'
,
'SERVER_SOFTWARE'
:
'TimerServer for Zope'
,
'SERVER_NAME'
:
''
,
'SERVER_PORT'
:
''
,
'SERVER_PORT'
:
'
-1
'
,
'REMOTE_ADDR'
:
''
,
'GATEWAY_INTERFACE'
:
'CGI/1.1'
,
'SERVER_PROTOCOL'
:
'HTTP/1.0'
,
...
...
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