[Checkins] SVN: zc.async/trunk/src/zc/async/ add missing test for
ping-when-deactivated
Gary Poster
gary at zope.com
Tue Jul 29 22:59:13 EDT 2008
Log message for revision 89010:
add missing test for ping-when-deactivated
Changed:
U zc.async/trunk/src/zc/async/CHANGES.txt
U zc.async/trunk/src/zc/async/queue.txt
-=-
Modified: zc.async/trunk/src/zc/async/CHANGES.txt
===================================================================
--- zc.async/trunk/src/zc/async/CHANGES.txt 2008-07-29 22:53:21 UTC (rev 89009)
+++ zc.async/trunk/src/zc/async/CHANGES.txt 2008-07-30 02:59:10 UTC (rev 89010)
@@ -18,7 +18,7 @@
- Add warning about long commits to tips and tricks.
- After complaining about a polling dispatcher that is deactivated not really
- being dead in the logs, reactivate. NEEDS TEST
+ being dead in the logs, reactivate.
- No longer use intermediate job to implement the success/failure addCallbacks
behavior. Introduce an ICallbackProxy that can be used for this kind of
Modified: zc.async/trunk/src/zc/async/queue.txt
===================================================================
--- zc.async/trunk/src/zc/async/queue.txt 2008-07-29 22:53:21 UTC (rev 89009)
+++ zc.async/trunk/src/zc/async/queue.txt 2008-07-30 02:59:10 UTC (rev 89010)
@@ -561,8 +561,29 @@
>>> da.dead
False
-Now we'll activate the dispatcher.
+``activate`` activates the dispatcher. A ``ping`` is not expected until the
+dispatcher is activated, though, to handle unusual circumstances such as the
+dispatcher being wrongfully declared dead ("I'm not dead yet!").
+ >>> bool(da.activated)
+ False
+ >>> queue.dispatchers.ping(UUID)
+ >>> bool(da.activated)
+ True
+ >>> print event_logs # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
+ z...
+ zc.async.events CRITICAL
+ Dispatcher UUID('...') not activated prior to ping. This can indicate
+ that the dispatcher's ping_death_interval is set too short, or that some
+ transactions in the system are taking too long to commit. Activating, to
+ correct the current problem, but if the dispatcher was inappropriately
+ viewed as ``dead`` and deactivated, you should investigate the cause.
+ >>> da.deactivate()
+ >>> bool(da.activated)
+ False
+
+Now we'll activate the dispatcher the proper way.
+
>>> import datetime
>>> import pytz
>>> now = datetime.datetime.now(pytz.UTC)
More information about the Checkins
mailing list