Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary /PIDKiln_vars.json request #14

Open
vitoyucepi opened this issue Jan 30, 2022 · 1 comment
Open

Unnecessary /PIDKiln_vars.json request #14

vitoyucepi opened this issue Jan 30, 2022 · 1 comment
Assignees

Comments

@vitoyucepi
Copy link

Summary

Web application executes additional request every 5 seconds.
This is caused by

setTimeout(executeQuery, 5000);

Actual behavior

  1. document.ready event
    $(document).ready(function() {
  2. executeQuery function
    function executeQuery() {
  3. $.ajax request

    PIDKiln/data/js/json.js

    Lines 46 to 49 in 87db341

    $.ajax({
    url : valuesUrl,
    dataType : 'json'
    })
  4. setTimeout
    setTimeout(executeQuery, 5000);
  5. another setTimeout
    setTimeout(executeQuery, 5000);
  6. Every 5 seconds executeQuery runs two times.

Expected behavior

Only one request should be fired every 5 seconds.

@Saur0o0n
Copy link
Owner

Hmm I'm vaguely remember I had a reason for that - but perhaps debugging only. I'll take a look.

@Saur0o0n Saur0o0n self-assigned this Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants