Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.
This repository was archived by the owner on May 30, 2024. It is now read-only.

Not polling updates #74

@phun-ky

Description

@phun-ky

With this code:

'use strict';
/*eslint no-console:0 quotes:0*/

import launchDarkly from 'ldclient-node';
import Bunyan from 'bunyan';
import winston from 'winston';
const logger = new Bunyan({ name: 'Server' });
const ldclient = launchDarkly.init('<my key>', {
  logger: new winston.Logger({
    level: 'debug',
    transports: [new winston.transports.Console()]
  }),
  stream: false,
  timeout: 3
});

ldclient.once('ready', function() {
  console.log('ldclient ready');
  ldclient.variation('<myflag>', { key: 'user@test.com' }, false, function(err, showFeature) {
    console.log(err);
    if (showFeature) {
      console.log('SHOW FEATURE', showFeature);
    } else {
      console.log('HIDE FEATURE', showFeature);
    }
  });
});

ldclient.once('error', function(err) {
  console.log(err);
});

I only get the console.log for SHOW/HIDE FEATURE once, even though I see the polling log flood. I am enabling/disabling the feature flag in the dashboard, nothing happens..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions