felixmosh / bull-board

🎯 Queue background jobs inspector
MIT License
2.36k stars 366 forks source link

Feature Request: Ability to disable/enable polling interval option from backend #789

Closed jb-abhi closed 3 months ago

jb-abhi commented 3 months ago

Problem There is a settings option provided in UI through which user can select the polling interval. But the issue is that if the user selects a shorter polling interval, say 3-5 sec, then there will be an increased load on the backend.

Suggestion Can add another optional option in UI Config Type with the name polling which can be set to off, which can then be used in UI to show/hide the polling interval option

Reasoning This UI can be used by QA, Devs, clients etc. to monitor the jobs. If client or QA selects a shorter polling option, then that may incur additional requests and charges for different hosting services like azure, aws etc.

felixmosh commented 3 months ago

Do you think that this should be under "read only" mode?

jb-abhi commented 3 months ago

yes, it would be great that way. Will the polling interval be set to off and hidden in "read only" mode? If so, that is fine.

felixmosh commented 3 months ago

I've added a new uiConfig for this.

  createBullBoard({
    queues: [new BullMQAdapter(exampleBullMq), new BullAdapter(exampleBull)],
    serverAdapter,
    options: {
      uiConfig: {
        pollingInterval: {
          forceInterval: 5, // any valid value, -1 for off.
          showSetting: false, // hides the setting option from Settings modal
        },
      },
    },
  });
jb-abhi commented 3 months ago

Oh, nice. Thanks a ton. 😊