Commit 11e8ee75 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: erp5_inotify: Migrate InotifyTool from filesystem.

parent a2b4c035
......@@ -33,7 +33,7 @@ from Products.ERP5.ERP5Site import addERP5Tool
class TestInotifyTool(ERP5TypeTestCase):
def test_inotify(self):
from Products.ERP5.Tool.InotifyTool import IN_CREATE, IN_MODIFY, IN_DELETE
from erp5.component.tool.InotifyTool import IN_CREATE, IN_MODIFY, IN_DELETE
addERP5Tool(self.portal, 'portal_inotify', 'Inotify Tool')
inotify_tool = self.portal.portal_inotify
for inotify in inotify_tool.objectValues():
......
......@@ -27,11 +27,9 @@
##############################################################################
import errno, glob, os, threading
from AccessControl import ClassSecurityInfo
from Acquisition import aq_base
from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type.TransactionalVariable import TransactionalResource
from Products.ERP5Type import Permissions
from Products.ERP5.mixin.timer_service import TimerServiceMixin
from AccessControl.SecurityManagement import newSecurityManager, \
getSecurityManager, setSecurityManager
......@@ -61,7 +59,7 @@ class InotifyTool(TimerServiceMixin, BaseTool):
except AttributeError:
pass
def process_timer(self, tick, interval, prev="", next=""):
def process_timer(self, tick, interval, prev="", next=""): # pylint: disable=redefined-builtin
if timerservice_lock.acquire(0):
try:
try:
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Tool Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>InotifyTool</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Tool.InotifyTool</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tool.erp5.InotifyTool</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Tool Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
tool.erp5.InotifyTool
\ No newline at end of file
......@@ -47,7 +47,7 @@ from Tool import CategoryTool, IdTool, TemplateTool,\
GadgetTool, ContributionRegistryTool, IntrospectionTool,\
AcknowledgementTool, SolverTool,\
UrlRegistryTool,\
CertificateAuthorityTool, InotifyTool
CertificateAuthorityTool
import ERP5Site
from Document import PythonScript, SQLMethod
object_classes = ( ERP5Site.ERP5Site,
......@@ -71,7 +71,6 @@ portal_tools = ( CategoryTool.CategoryTool,
SolverTool.SolverTool,
UrlRegistryTool.UrlRegistryTool,
CertificateAuthorityTool.CertificateAuthorityTool,
InotifyTool.InotifyTool,
)
content_classes = ()
content_constructors = ()
......
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