Skip to content

Performance improvement for 'disabled?' method #4

@andreionut

Description

@andreionut

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions