Open troydavisson opened 7 years ago
You can also be "401 Unauthorized" because of timeout.
Note that I ran into what is probably a similar issue
I have a Laravel Job Queue to which I dispatch jobs to process RETS data retrievals - Each of these jobs usually has a different set of login credentials.
The Job Queue runs as a background process using supervisord
This normally worked great until one time where Job B
retrieved data from what appeared to be the credentials assigned to Job A
- These jobs ran very close to each other (time-wise)
I don't know for sure, but I suspect this is session related - Because Job A
and Job B
had different queries and I could tell that Job
B executed the correct query but executed it using Job A
credentials -
The net effect was Job B
retrieved properties for the wrong brokerage
I updated my code to do 2 things now and hopefully this clears up the issue
\PHRETS\Http\Client::set(new **\GuzzleHttp\Client);
from https://github.com/troydavisson/PHRETS/issues/146#issue-225724907Disconnect()
when the retrieval job was complete
When looping through a number of RETS servers, you could run into cases where connection attempts fail.
Until a broader change is made, adding the following code before you make a new PHRETS
Session
object should get around the problem: