INNER CODE UNIT · TypeScript

consume

rotki/rotki · frontend/app/src/modules/core/messaging/index.ts:67

  const consume = async (): Promise<void> => {
    if (isRunning)
      return;

    isRunning = true;
    const title = t('actions.notifications.consume.message_title');

    try {
      const { dropped, messages } = await backoff(3, async () => consumeMessages(), 10000, sessionWorkSignal());

      for (const { count, lastSent, ...raw } of messages) {
        const message = parseMessage(raw);
        if (message)
          await route(message, { count, lastSent: new Date(lastSent * 1000) });
      }

      if (dropped > 0) {
        notify({

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…