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): ...@@ -231,14 +231,18 @@ class MailBase(Acquisition.Implicit, OFS.SimpleItem.Item, RoleManager):
return False return False
security.declareProtected(change_configuration, 'manage_restartQueueThread') 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 """ """ Restart the queue processor thread """
self._stopQueueProcessorThread() if action == 'stop':
self._startQueueProcessorThread() self._stopQueueProcessorThread()
elif action == 'start':
self._startQueueProcessorThread()
else:
raise ValueError('Unsupported action %s' % action)
if REQUEST is not None: 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) return self.manage_main(self, REQUEST, manage_tabs_message=msg)
......
...@@ -128,14 +128,22 @@ ...@@ -128,14 +128,22 @@
<tr> <tr>
<td align="left" valign="top"> <td align="left" valign="top">
<div class="form-label"> <div class="form-label">
Queue processor thread alive?<br/> Status of queue processor thread<br/>
</div> </div>
</td> </td>
<td align="left" valign="top"> <td align="left" valign="top">
<div class="form-help"> <div class="form-help">
<dtml-var queueThreadAlive>
<br/> <dtml-if "queueThreadAlive()">
<a href="manage_restartQueueThread">Restart queue processor thread</a> (this may take some seconds) 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> </div>
</td> </td>
</tr> </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