hdelall = async (pattern, cursor = '0') => {
  const reply = await redis.scan(cursor, 'MATCH', pattern, 'COUNT', 1000);

  const replyCursor = reply[0];

  if (reply[1]) {
    await Promise.all(reply[1].map(async replyKey => del(replyKey)));
  }

  if (replyCursor === '0') {
    // no more cursor

    return true;
  }

  // has more cursor
  return hdelall(pattern, replyCursor);
}
Delete all matching keys

@param {*} pattern
@param {*} cursor
@returns