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

ZODB Components: erp5_inotify: Migrate InotifyTool from filesystem.

parent a2b4c035
Pipeline #9604 failed with stage
in 0 seconds
...@@ -33,7 +33,7 @@ from Products.ERP5.ERP5Site import addERP5Tool ...@@ -33,7 +33,7 @@ from Products.ERP5.ERP5Site import addERP5Tool
class TestInotifyTool(ERP5TypeTestCase): class TestInotifyTool(ERP5TypeTestCase):
def test_inotify(self): 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') addERP5Tool(self.portal, 'portal_inotify', 'Inotify Tool')
inotify_tool = self.portal.portal_inotify inotify_tool = self.portal.portal_inotify
for inotify in inotify_tool.objectValues(): for inotify in inotify_tool.objectValues():
......
...@@ -27,11 +27,9 @@ ...@@ -27,11 +27,9 @@
############################################################################## ##############################################################################
import errno, glob, os, threading import errno, glob, os, threading
from AccessControl import ClassSecurityInfo
from Acquisition import aq_base from Acquisition import aq_base
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type.TransactionalVariable import TransactionalResource from Products.ERP5Type.TransactionalVariable import TransactionalResource
from Products.ERP5Type import Permissions
from Products.ERP5.mixin.timer_service import TimerServiceMixin from Products.ERP5.mixin.timer_service import TimerServiceMixin
from AccessControl.SecurityManagement import newSecurityManager, \ from AccessControl.SecurityManagement import newSecurityManager, \
getSecurityManager, setSecurityManager getSecurityManager, setSecurityManager
...@@ -61,7 +59,7 @@ class InotifyTool(TimerServiceMixin, BaseTool): ...@@ -61,7 +59,7 @@ class InotifyTool(TimerServiceMixin, BaseTool):
except AttributeError: except AttributeError:
pass 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): if timerservice_lock.acquire(0):
try: try:
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,\ ...@@ -47,7 +47,7 @@ from Tool import CategoryTool, IdTool, TemplateTool,\
GadgetTool, ContributionRegistryTool, IntrospectionTool,\ GadgetTool, ContributionRegistryTool, IntrospectionTool,\
AcknowledgementTool, SolverTool,\ AcknowledgementTool, SolverTool,\
UrlRegistryTool,\ UrlRegistryTool,\
CertificateAuthorityTool, InotifyTool CertificateAuthorityTool
import ERP5Site import ERP5Site
from Document import PythonScript, SQLMethod from Document import PythonScript, SQLMethod
object_classes = ( ERP5Site.ERP5Site, object_classes = ( ERP5Site.ERP5Site,
...@@ -71,7 +71,6 @@ portal_tools = ( CategoryTool.CategoryTool, ...@@ -71,7 +71,6 @@ portal_tools = ( CategoryTool.CategoryTool,
SolverTool.SolverTool, SolverTool.SolverTool,
UrlRegistryTool.UrlRegistryTool, UrlRegistryTool.UrlRegistryTool,
CertificateAuthorityTool.CertificateAuthorityTool, CertificateAuthorityTool.CertificateAuthorityTool,
InotifyTool.InotifyTool,
) )
content_classes = () content_classes = ()
content_constructors = () 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