Skip to content

Commit

Permalink
Fixed Dcc Plugin startup.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoveda committed Feb 4, 2021
1 parent 31ac0b5 commit 3f452da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions artella/core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from urllib import urlencode
from urllib2 import urlopen, Request, HTTPError, URLError

import artella
from artella import dcc
from artella.core import consts, utils, exceptions, dccplugin

logger = logging.getLogger('artella')
Expand Down Expand Up @@ -201,8 +201,6 @@ def update_remotes_sessions(self, show_dialogs=True):
:rtype: list(str)
"""

from artella import dcc

def _ping_remote_sessions():
rsp = self.ping()
if 'error' in rsp:
Expand Down
4 changes: 3 additions & 1 deletion artella/core/dccplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def init_client(self, show_dialogs=True):
artella_drive_client = self._artella_drive_client or self.get_client(show_dialogs=show_dialogs)
if artella_drive_client:
self.setup_project(artella_drive_client.get_local_root())
artella_drive_client.artella_drive_listen()
else:
logger.warning(
'Artella Drive Client was not initialized. Artella server '
Expand Down Expand Up @@ -1063,7 +1064,8 @@ def _execute_in_main_thread(self, invoker_id, fn, *args, **kwargs):
if dcc_main_thread_fn:
return dcc_main_thread_fn(fn, *args, **kwargs)
else:
invoker = (self._main_thread_invoker if invoker_id == self._SYNC_INVOKER else self._main_thread_async_invoker)
invoker = (
self._main_thread_invoker if invoker_id == self._SYNC_INVOKER else self._main_thread_async_invoker)
if invoker:
if QtWidgets.QApplication.instance() and (
QtCore.QThread.currentThread() != QtWidgets.QApplication.instance().thread()):
Expand Down

0 comments on commit 3f452da

Please sign in to comment.