security service/ensure_flushed() decorator: check if session is currently flushing