Commit 33c1249a authored by Andreas Jung's avatar Andreas Jung

better wording

parent ec2c6d5e
......@@ -231,14 +231,18 @@ class MailBase(Acquisition.Implicit, OFS.SimpleItem.Item, RoleManager):
return False
security.declareProtected(change_configuration, 'manage_restartQueueThread')
def manage_restartQueueThread(self, REQUEST=None):
def manage_restartQueueThread(self, action='start', REQUEST=None):
""" Restart the queue processor thread """
self._stopQueueProcessorThread()
self._startQueueProcessorThread()
if action == 'stop':
self._stopQueueProcessorThread()
elif action == 'start':
self._startQueueProcessorThread()
else:
raise ValueError('Unsupported action %s' % action)
if REQUEST is not None:
msg = 'Queue processor thread restarted'
msg = 'Queue processor thread %sed' % action
return self.manage_main(self, REQUEST, manage_tabs_message=msg)
......
......@@ -128,14 +128,22 @@
<tr>
<td align="left" valign="top">
<div class="form-label">
Queue processor thread alive?<br/>
Status of queue processor thread<br/>
</div>
</td>
<td align="left" valign="top">
<div class="form-help">
<dtml-var queueThreadAlive>
<br/>
<a href="manage_restartQueueThread">Restart queue processor thread</a> (this may take some seconds)
<dtml-if "queueThreadAlive()">
Running
<br/>
<a href="manage_restartQueueThread?action=stop">Stop queue processor thread</a> (this may take some seconds)
</dtml-if>
<dtml-if "not queueThreadAlive()">
Stopped
<br/>
<a href="manage_restartQueueThread?action=start">Start queue processor thread</a> (this may take some seconds)
</dtml-if>
</div>
</td>
</tr>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment