#NEWLINE# @ staticmethod #NEWLINE# def cancel_expiration( session , group_name , member_name , recipients = None ) : #NEWLINE# #INDENT# async_key = AsyncNotification . _expiration_key ( group_name , member_name ) #NEWLINE# opt_arg = [ ] #NEWLINE# if ( recipients is not None ) : #NEWLINE# #INDENT# exprs = [ ( AsyncNotification . email == recipients ) for recipient in recipients ] #NEWLINE# opt_arg . append ( or_ ( * exprs ) ) #NEWLINE# #UNINDENT# session . query ( AsyncNotification ) . filter ( ( AsyncNotification . key == async_key ) , ( AsyncNotification . sent == False ) , * opt_arg ) . delete ( ) #NEWLINE# session . commit ( )