[Zope3-Users] Re: lovely.remotetask question
Jürgen Kartnaller
juergen at kartnaller.at
Wed Apr 4 03:07:02 EDT 2007
Maciej Wisniowski wrote:
>> For startup do this :
>>
>> @component.adapter(IDatabaseOpenedEvent)
>> def startRemoteTask(event):
>> """Start the amazon remotetask on startup."""
>> db = event.database
>> connection = db.open()
>> root = connection.root()
>> root_folder = root.get(ZopePublication.root_name, None)
>> for site in root_folder.values():
>> service = component.queryUtility(
>> ITaskService, context=site)
>> if service is not None:
>> if not service.isProcessing():
>> service.startProcessing()
>>
>> I assume here that the remote tasks are located in one of the site
>> directly contained in root.
> Works for me now :)
>>
>> For shutdown :
>>
>> I have no solution for this right now.
> So seems that now it is best to manually click on stop processing button
> via
> ZMI before shutting Zope down.
Or use zopectl start/stop.
Jürgen
More information about the Zope3-users
mailing list