-
Notifications
You must be signed in to change notification settings - Fork 1
Description
From code review comments: #2 (comment)
Another possibility to ensure performance: You could use settings.all_key with the JSON data as the source of truth, but have a separate Redis key with a cached representation that is serialized with Marshal and already contains Settings objects. The TTL on that key could be very low, like 5-60 seconds, to ensure that it's regenerated frequently and doesn't contain stale settings. But then only one job in the time interval would pay the price of having to deserialize the JSON and parse it, and the rest would be able to leverage the existing parsed data more directly. (10 does seem like a reasonable limit for temporarily disabled jobs though.)
Consider implementing this instead of the current 10 rules/job limit.