I am working on a pair of services that will update two systems through REST API calls. The first is for location 1, executing update calls on classes that make use of the observer pattern in php, to trigger an update service. This update service then executes the API call to update location 2.
When location 2 gets an update it will also execute a series of updates. These updates will trigger API calls to location 1.
My problem is that this will continue if I don't terminate it at one end. The easiest way I can think to do that is to suppress the Observer in some way. Is there an easy way to do this? Or for that matter is there a better solution to my problem?