Skip to content

defer session initialization #27

@rkoschmitzky

Description

@rkoschmitzky

Goal

Initialize a session when actually needed and not on module import.

Motivation

Currently, the SESSION singleton will be created when importing trackteroid which is not ideal as it results in an ImportError if a connection can not be established. Instead, the connection attempt should be made when actually needed.

Considerations

As our Session class already acts as a delegate for the Ftrack Python API Session we might be able to track and establish a connection on any self._session attribute access.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions