Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add cancellation support to @cached and @cachedList decorators #12183

Merged
merged 8 commits into from
Mar 14, 2022

Commits on Mar 8, 2022

  1. Add delay_cancellation utility function

    `delay_cancellation` behaves like `stop_cancellation`, except it
    delays `CancelledError`s until the original `Deferred` resolves.
    This is handy for unifying cleanup paths and ensuring that uncancelled
    coroutines don't use finished logcontexts.
    
    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Mar 8, 2022
    Configuration menu
    Copy the full SHA
    64f8ae2 View commit details
    Browse the repository at this point in the history
  2. Fix logcontexts when @cached and @cachedList lookups are cancelled

    `@cached` and `@cachedList` must wait until the wrapped method has
    completed before raising `CancelledError`s, otherwise the wrapped method
    will continue running in the background with a logging context that has
    been marked as finished.
    
    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Mar 8, 2022
    Configuration menu
    Copy the full SHA
    9854e29 View commit details
    Browse the repository at this point in the history
  3. Add basic cancellation tests for @cached and @cachedList decorators

    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Mar 8, 2022
    Configuration menu
    Copy the full SHA
    44d93c1 View commit details
    Browse the repository at this point in the history
  4. Add tests for logcontexts during @cached and @cachedList cancella…

    …tion
    
    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Mar 8, 2022
    Configuration menu
    Copy the full SHA
    9dc3a32 View commit details
    Browse the repository at this point in the history
  5. Add newsfile

    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Mar 8, 2022
    Configuration menu
    Copy the full SHA
    0f29d56 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2022

  1. Configuration menu
    Copy the full SHA
    3821cde View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    966cdc2 View commit details
    Browse the repository at this point in the history
  3. @cachedList now takes kwargs

    Sean Quah committed Mar 14, 2022
    Configuration menu
    Copy the full SHA
    356e92a View commit details
    Browse the repository at this point in the history