Archaegeo / DualUniverseLuaIssues

DualUniverse LUA Issue Tracking
GNU General Public License v3.0
5 stars 0 forks source link

container.acquireStorage() method is not 10 queries per five minutes like the description says #23

Open Kenesti opened 3 years ago

Kenesti commented 3 years ago

The current description of the container.acquireStorage() method says "(only 10 queries/5min)", but in actuality 10 calls to container.acquireStorage() can be made and then a 5-minute cooldown is initiated, no matter the spacing of the calls.

It would be much more beneficial to lua coders to have it be a max of 10 calls in a 5-minute rolling timeframe, rather than making 9 calls (either spaced out or in quick succession) and then having the 10th (no matter how long after the 9th call) trigger a 5-minute cooldown. Even if you make 9 calls that are spaced out, the 10th triggers the cooldown and breaks any subroutine you may have had going at the time - this is less than ideal and fixing it would greatly improve the flexibility of utilizing this method.

A popular use case would be a container inventory monitor, of course. Another use case that's a bit more complex would be for Organization container logs, so that an Org could keep track of what members added or removed items from a particular container they have access to.

samdeane commented 3 years ago

It would make more sense if container.acquireStorage() returned the time that you can next call it.

This would allow the delay to be dynamic, based on server load or usage over a longer period of time. If you hammer it, you'd be throttled, but if the servers weren't loaded you'd get better performance.

It would also remove the need for guesswork / manual polling in client code, and make it a lot simpler to use.

NQ-Ligo commented 2 years ago

Hello !

To be clear, we know there is a problem with this. We plan to rework it, so we decided to keep it as is for now until we rework it into our goal, rather than rework just to solve this problem, to rework it later.

We would like to rework this with the integration of the item API that you could discover with Athena. This is planned but no date can be given yet.