publish should be called when the state is changed #1759
publish should not be called during every wait cycle, only after the wait has found the correct state
What kind of change does this PR introduce?
What is the related issue number (starting with
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Sorry to let this linger so long. I've reviewed this superficially twice but I continue to feel like there's no clear answer. I agree the code itself seems wrong. What I'm struggling with is determining what this code is intended to do and if it still accomplishes the intention in this new form. I'm trying to devise a test or some other action to improve my confidence in the change.
I removed the
diff --git a/cherrypy/process/wspbus.py b/cherrypy/process/wspbus.py index 8f762ef0..4af4c752 100644 --- a/cherrypy/process/wspbus.py +++ b/cherrypy/process/wspbus.py @@ -375,7 +375,6 @@ class Bus(object): while self.state not in states: time.sleep(interval) - self.publish(channel) def _do_execv(self): """Re-execute the current process.
Then ran the CherryPy tests, and they all passed. That suggests to me that this code isn't covered by the tests and isn't essential to CherryPy in its typical use.
Given our inability to test this functionality, I'm inclined to rely on the evidence described in the ticket for why this change produces a preferred behavior and accept it.
Right, even integration with other things like http://docs.cherrypy.org/en/latest/deploy.html#tornado requires that.
@jaraco can we just have