[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services -
hubcontrol.pt:1.4
Garrett Smith
garrett at mojave-corp.com
Thu Aug 7 12:33:18 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/browser/services
In directory cvs.zope.org:/tmp/cvs-serv6429/src/zope/app/browser/services
Modified Files:
hubcontrol.pt
Log Message:
Added lazy unregistration to the object hub. It's currently possible to leave invalid object registrations when containers are deleted. These changes help to mitigate this problem until a more robust solution is in place. Details of the lazy unregistration are documented in test_objecthub.py.
These changes minimize the impact to the hub. More aggressive checks/unregistration of missing objects can be added if need be.
This change also includes the addition of a temporary hub method - unregisterMissingObjects - for unregistering invalid/missing objects. This functionality is exposed in the hub control form through a button the user can click to remove any missing objects.
=== Zope3/src/zope/app/browser/services/hubcontrol.pt 1.3 => 1.4 ===
--- Zope3/src/zope/app/browser/services/hubcontrol.pt:1.3 Thu Feb 20 20:40:55 2003
+++ Zope3/src/zope/app/browser/services/hubcontrol.pt Thu Aug 7 11:32:44 2003
@@ -18,9 +18,15 @@
</head>
<body>
<div metal:fill-slot="body">
-This is an object hub. There are
-<span tal:replace="context/numRegistrations">(some number of)</span>
-objects registered.
+<div class="message" tal:condition="request/unregister_missing|nothing">
+ <span tal:replace="context/unregisterMissingObjects">5</span> object(s) unregistered.
+</div>
+<p>This is an object hub. There are <span tal:replace="context/numRegistrations">
+(some number of)</span> objects registered.
+</p>
+<form>
+<input type="submit" name="unregister_missing" value="Unregister Missing Objects" />
+</form>
</div>
</body>
</html>
More information about the Zope3-Checkins
mailing list