Esempio n. 1
0
        public async Task Can_BgSave()
        {
            try
            {
                await NativeAsync.BgSaveAsync();
            }
            catch (RedisResponseException e)
            {
                // if exception has that message then it still proves that BgSave works as expected.
                if (e.Message.StartsWith("Can't BGSAVE while AOF log rewriting is in progress") ||
                    e.Message.StartsWith("An AOF log rewriting in progress: can't BGSAVE right now") ||
                    e.Message.StartsWith("Background save already in progress") ||
                    e.Message.StartsWith("Another child process is active (AOF?): can't BGSAVE right now"))
                {
                    return;
                }

                throw;
            }
        }