Closed (fixed)
Project:
Acquia Connector
Version:
7.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
29 Dec 2010 at 15:11 UTC
Updated:
21 Feb 2011 at 14:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
pwolanin commentedIt's not clear to me why that new parameter is needed.
Comment #2
dmitry_bezer commentedacquia_agent_check_subscription() checks subscription status and calls acquia_subscription_status hook if it detected that the status has changed. The $force_status_update parameter is just intended to force the hook to be called if caller wants that.
Comment #3
pwolanin commentedSeems like the hook definition is changing then - previously you described it as being only invoked when the status changes.
What problem are you trying to solve here?
Comment #4
dmitry_bezer commentedacquia_agent_check_subscription() via the hook notifies other modules if something was changed. The problem that it may not detect it in some cases, so caller of acquia_agent_check_subscription() just forces it to call the hook...
Comment #5
pwolanin commentedIn that case, perhaps the design should change to just always send a notification, rather than trying to send just on change?
Comment #6
dmitry_bezer commentedacquia_agent_check_subscription() is also periodically called by cron to send heartbeats to AN so the notification would be sent each time cron is run but the status is not actually changed.
attached is updated patch that also removes old code
Comment #7
pwolanin commentedWhat's the downside of making the call each time?
It still doesn't make sense to me to "force" the API call. It should either happen on change, or always.
Comment #8
dmitry_bezer commentedOk. Let the notification happen each time then.
Comment #9
dmitry_bezer commentedComment #10
pwolanin commentedSeem like we should change the code in pages.inc too?
Comment #11
dmitry_bezer commentedYes. I missed that
thank you
Comment #12
pwolanin commentedcommitted