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

Gui hangs on opening if it cannot connect to irida #77

Open
JeffreyThiessen opened this issue Apr 20, 2020 · 1 comment
Open

Gui hangs on opening if it cannot connect to irida #77

JeffreyThiessen opened this issue Apr 20, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@JeffreyThiessen
Copy link
Member

Describe the bug

If the config file has an url and the uploader cannot connect to it, the gui will try to connect X times before showing the GUI

Steps to reproduce the problem

What were you doing when you encountered the problem?

  1. put a valid url, that 404's
  2. restart uploader
  3. takes a long time to open

Expected behaviour

We should have the connect to irida code run in a separate thread, so the gui never hangs when attempting to connect.

@JeffreyThiessen JeffreyThiessen added the bug Something isn't working label Apr 20, 2020
@JeffreyThiessen
Copy link
Member Author

This is because of the following code flow

  1. On launch the MainDialog is instantiated
  2. The MainDialog at __init__ creates an instance of ConfigDialog
  3. during ConfigDialog's __init__ it runs self._get_settings_from_file() and self._contact_irida() to load settings and connect to irida.
    ** Settings must be loaded from file for uploader to function
    ** Without an initial connection to irida, the uploader will error when the user starts uploading, not when they parse
    ** A request to IRIDA that is invalid but does not instantly 404/400 causes the uploader to wait for reconnect attempts
  4. After a connection is established or retries fail, show the MainDialog

One solution to this might be to init the MainDialog and ConfigDialog without the contact irida step, then show both dialogs (gui starts with config screen open) and then try to connect to IRIDA, with a message to the user about connecting to IRIDA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant