Skip to main content

data.entities.project.project_external_state

ProjectExternalState Objects

@dataclass_json

@dataclass(kw_only=True)
class ProjectExternalState()

A project's external state.

Attributes:

  • external_state - The state on the external service.
  • external_id - The project ID within the external service.

State Objects

class State(StrEnum)

The external state of a project.

get_last_known_external_project_state

def get_last_known_external_project_state(
project: Project,
connector_instance: ConnectorInstanceID) -> ProjectExternalState

Retrieves the last known external state of a project consisting of its base upload state and external ID.

Arguments:

  • project - The project.
  • connector_instance - The connector instance ID.

Returns:

The external state of the project.

check_reuse_external_project

def check_reuse_external_project(external_state: ProjectExternalState) -> bool

Checks whether an external project should be reused when uploading.

Arguments:

  • external_state - The external project state.

compare_external_project_states

def compare_external_project_states(state1: ProjectExternalState,
state2: ProjectExternalState) -> bool

Checks if two external project states are equal.

Arguments:

  • state1 - First state.
  • state2 - Second state.

Returns:

Whether both states are equal.