AshRateLimiter - warning that unrelated update actions cannot be done atomically
I'm playing around with AshRateLimiter and have something like this:
And I'm specially handling "skip" to not apply rate limiting in my Hammer module.
That all works, but my update actions are now giving warnings, even though I didn't touch them:
Any ideas why?
Thanks
6 Replies
Read the update actions guide about atomic updates
I think there might be room here for atomic safe before action hooks TBH
@jart interesting thought here
right but I'm not rate limiting any update actions
at least not intentionally, lol
yeah but the before action hook in the rate limited actions always has to fire to check if the action should be rate limited. This means that it can no longer be run atomically. It's fine, just disable the warning.
I'm explaining things poorly
The update action it's warning about doesn't have rate limiting
Only a few create actions in the same resource do
Don't want these update actions to not be atomic
It seems like if you add rate limiting to any action, you can't have any non default atomic update actions in the same resource or something
Oh. Yeah that’s not right. Please open an issue on the repo.
https://github.com/ash-project/ash_rate_limiter/issues/38
put together this, let me know if there's anything missing
GitHub
Non rate-limited update actions cannot be done atomically · Issue ...
Code of Conduct I agree to follow this project's Code of Conduct AI Policy I agree to follow this project's AI Policy, or I agree that AI was not used while creating this issue. Versions $ ...