def __init__(self): self.logger = logging.getLogger(__name__) self.actions = [] self.collectionToActionsMap = dict() self.m_linkActionToCollectionEvent = Event() self.m_unlinkActionFromCollectionEvent = Event() self.m_registerActionEvent = Event()
def __init__(self, watchedFolder: str, watchedExtensions: List[str] = None, recursive=False) -> None: super().__init__() self.watchedFolder = watchedFolder self.watchedExtensions = watchedExtensions self.recursive = recursive self.fileModifiedEvent = Event() self.fileCreatedEvent = Event()
def __init__(self, remoteFolder: str, host: str, username: str, password: str, watchedExtensions: List[str] = None, recursive=False) -> None: """Creates the SFTP watch dog. Args: remoteFolder (str): The remote folder to watch. serializationFilename (str): The absolute path to the filename used for serialization of watch dog info. host (str): The SFTP server host. username (str): SFTP server username. password (str): SFTP server password. """ if remoteFolder.startswith('.'): remoteFolder = remoteFolder[1:] super().__init__(remoteFolder, watchedExtensions, recursive) self.host = host self.username = username self.password = password self.sftp = None self.pollingIntervalInSeconds = 1.0 self._running = False self.lastTime = datetime.now() self.knownFiles = dict() self.onConnectionEstablished = Event()
def __init__(self, dbManager: MongoDBManager) -> None: super().__init__() self.dbManager = dbManager self.customFilters: List[DocumentFilter] = [] self.onFilterListUpdateEvent = Event() self.addFilter(DocumentFilter(self.hasPreviewFilter, 'Has Preview'))
def __init__(self) -> None: super().__init__() self.name = None self.description = None self._status = ServiceStatus.Created self.active = None self.statusChangedEvent = Event() self.serviceRegistry = None
def __init__(self, dbManager: MongoDBManager, hostProcessController: HostProcessController, serviceRegistry) -> None: super().__init__() self.dbManager = dbManager self.hostProcessController = hostProcessController self.serviceRegistry = serviceRegistry self.serviceClasses = set() self.services :List[Service] = [] self.threadPoolExecutor = ThreadPoolExecutor() self.serviceStatusChangedEvent = Event()
def __init__(self, dbManager: MongoDBManager) -> None: super().__init__() self.dbManager = dbManager self.isRunning = True self.logger = logging.getLogger(__name__) self.dbManager.hostProcessesCollection.create_index( "heartbeat_time", expireAfterSeconds=HostProcess.dyingTimeInSeconds) # Arguments are: self._onHostProcessAddedEvent = Event() self._onHostProcessRemovedEvent = Event() self.threadPoolExecutor = ThreadPoolExecutor(max_workers=1) self._hostProcessInfos: Dict[str, HostProcessInfo] = dict() self.thisHost = HostProcess(dbManager)
def init(): global NODE_CLASSES_TO_REGISTER global NODE_CLASS_ADDED_EVENT try: if NODE_CLASSES_TO_REGISTER != None: return except: pass NODE_CLASSES_TO_REGISTER = set() NODE_CLASS_ADDED_EVENT = Event()
def __init__(self, parentWindow, dbManager: MongoDBManager): super().__init__("Collection Viewer", parentWindow, asset_manager.getUIFilePath("collectionManager.ui")) self.dbManager = dbManager self.collectionCheckBoxMap = dict() self.collectionsLayout.setAlignment(QtCore.Qt.AlignTop) self.widget.collectionPropertiesVBox.setAlignment(QtCore.Qt.AlignTop) self.collectionsComboBox.currentIndexChanged.connect( self.onCollectionsComboBoxIndexChanged) self.collectionHeaderKeyInfos = [] self.collectionTableWidget: QTableWidget = self.widget.collectionPropertiesTableWidget self.updateCollections() self.headerUpdatedEvent = Event()