Question about periodically polling data from client-side

  • henk_08753-1370840247436578826

    Henk_BLUE

    7 days ago

    I have built a dashboard in Nordcraft and I wish to fetch new data each 15 or 30 minutes from 8am to 8 pm (it is very very basic, I am not working with websockets). What would be the best way to handle this? I feel like setting a sleep of 1.8 million ms in a workflow is not a solution..
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
  • Tod-1370840250284380330

    Tod

    7 days ago

    Great job @Henk_BLUE! Your contribution to the Nordcraft Community just made you advance to Community Level 1! 🌲
  • lucasg-1370864236699324426

    Lucas G

    7 days ago

    15mins is 900000ms
  • You'd need to set an interval for that
  • What type of use case would have the client stay connected all day like that? Like a dashboard on a screen all day?
  • henk_08753-1371025977936711733

    Henk_BLUE

    6 days ago

    Hi Lucas, yes it is an dashboard that they narrowcast all day in their office. An interval of 900000ms for 15min or 1800000ms for 30min is a viable option then, is that correct?

    I'd thought that I would start a workflow on page load that calls the api, then interval/sleep, and on tick calls itself again. Maybe add a function that takes the current time into account. What do you think?
  • kingdragxn-1371091043449049118

    Jay | DRAGXN

    6 days ago

    This what I would go with if you just need to refetch every 15/30 minutes. Just a workflow that calls it on page load and then sleeps til the recall.
  • henk_08753-1371093792500879552

    Henk_BLUE

    6 days ago

    That is how I built it and it works, thanks both 🙌🏼
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1
    😎1
    🔥1