Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@rats @zero @KayFaraday @MischievousTomato @netdoll @spiral zero's a bit optimistic; it wouldn't work with FSE's.
Also, you know, I tell Nichy to just
:mycomputer: with {:error, _} <- Cachex.stats(:blockbot), do: Cachex.start(:blockbot)
:mycomputer: {_, n} = Cachex.fetch(:blockbot, object["actor"], fn(i) -> {:commit, :os.system_time(:seconds)-1} end)
:mycomputer: t = :os.system_time(:seconds)
:mycomputer: if t > n do
:mycomputer: Cachex.set(:blockbot, object["actor"], t+5)
:mycomputer: do_the_blockbot_message()
:mycomputer: else
:mycomputer: Cachex.incr(:blockbot, object["actor"], 30*(1+(n-t)))
:mycomputer: # lol lmao
:mycomputer: end
...And he never does. This would completely stop the thing I do, race conditions aside (impact of hitting the race is minimal unless you do the Alex Gleason strategy of cranking up the number of default workers by a factor of 10). I think some of the rate-limiters use a tempfile, it's garbage. There are 80 ways to stop me doing what I am doing and nobody does any of them. verita84's is rate-limited by design because it only fires periodically.