Closed keneanung closed 9 years ago
Hmmm... I've been playing around withthose changes and the way the priority queue is currently written makes adding new types dynamically a little tricky... For example currently the type "back" gets created. If you want to fill the item listing queue however, it does not know which priority this type should get.
Since the commerce API allows us to fetch up to 200 (I think?) items at once, I am also not sure if the priority stuff is still needed at all.
hmm, we can change the worker to do up to 200 items in 1 requests at least to speed things up.
I'd like to keep the priority system in place though, over the past years I've gone back and forth between different ways of fetching the prices and the priority system has always been a way of mitigating the pain when the method of fetching the prices was slow.
We can add a default case with PRIO_TWO I guess to be able to handle new types.
I took some time to look through the diff and the PR looks good btw, I just need to test and deploy it, I'm trying really hard to make some time for that, hopefully this evening!
Take your time. I won't have much time this weekend to set the default value anyways. Sometimes I also noticed some strange glitches, which I couldn't look at yet.
it's working better than the currently broken scripts so an improvement at the very least.
what glitches are you talking about?
if it has to do with failing requests, I got a different library to do the multicurl a bit better if necesary
Well... I noticed that sometimes I got single null
elements in the arrays
returned from Itemv2::getMultipleItemsByJSON
. Also some (changing) items
threw caught exceptions.
But both happened when I queried by IDs instead of using paging. I forgot to check it with the paging.
This branch completely switches Item updates (not listing updates) to the official GW2 API v2.
I also took the liberty to remove the classes associated with the ItemDB-Queue as it is not needed anymore. I hope I did not overlook any references.
The scripts called in the
daemons
directory now output an error message and exit with code 1 if they are called. That way no cron job or other automated call should slip past.