Rate limiting issue with immediate logging of query value

It seems like the rate limiting implementation has a smol issue. where should I report this? "Another query..." is logged immediately with a value of 60 (1010 > 1000), if I turn it to e.g. 600, it correctly waits
    const rateLimiter = yield* $(
      RateLimiter.make({ limit: 1000, interval: '20 seconds' })
    )

    // Query API costs 1 credit per call ( 1 is the default cost )
    const queryAPIRL = compose(rateLimiter, RateLimiter.withCost(900))
    // Mutation API costs 5 credits per call
    const mutationAPIRL = compose(rateLimiter, RateLimiter.withCost(50))

    // Use the pre-defined rate limiters
    yield* $(queryAPIRL(Effect.log('Sample Query')))
    yield* $(mutationAPIRL(Effect.log('Sample Mutation')))

    // Or set a cost on-the-fly
    yield* $(
      rateLimiter(Effect.log('Another query with a different cost')).pipe(
        RateLimiter.withCost(60)
      )
    )
Was this page helpful?