documente_shared 0.1.37__tar.gz → 0.1.38__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of documente_shared might be problematic. Click here for more details.
- {documente_shared-0.1.37 → documente_shared-0.1.38}/PKG-INFO +1 -1
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/domain/entities/document_process.py +23 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/pyproject.toml +1 -1
- {documente_shared-0.1.37 → documente_shared-0.1.38}/README.md +0 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/__init__.py +0 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/application/__init__.py +0 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/application/digest.py +0 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/application/time_utils.py +0 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/domain/__init__.py +0 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/domain/base_enum.py +0 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/domain/entities/__init__.py +0 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/domain/entities/document_process_metadata.py +0 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/domain/enums.py +0 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/domain/repositories.py +0 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/infrastructure/__init__.py +0 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/infrastructure/dynamo_repositories.py +0 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/infrastructure/dynamo_table.py +0 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/infrastructure/s3_bucket.py +0 -0
- {documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/infrastructure/sqs_queue.py +0 -0
|
@@ -69,6 +69,13 @@ class DocumentProcess(object):
|
|
|
69
69
|
self.file_path,
|
|
70
70
|
])
|
|
71
71
|
|
|
72
|
+
@property
|
|
73
|
+
def is_finished(self) -> bool:
|
|
74
|
+
return self.status in [
|
|
75
|
+
DocumentProcessStatus.COMPLETED,
|
|
76
|
+
DocumentProcessStatus.FAILED,
|
|
77
|
+
]
|
|
78
|
+
|
|
72
79
|
def enqueue(self):
|
|
73
80
|
self.status = DocumentProcessStatus.ENQUEUED
|
|
74
81
|
self.enqueued_at = datetime.now()
|
|
@@ -114,6 +121,22 @@ class DocumentProcess(object):
|
|
|
114
121
|
filename_with_extension = self.extended_filename
|
|
115
122
|
return filename_with_extension.split('.')[0]
|
|
116
123
|
|
|
124
|
+
def __eq__(self, other: 'DocumentProcess') -> bool:
|
|
125
|
+
if not other:
|
|
126
|
+
return False
|
|
127
|
+
|
|
128
|
+
return (
|
|
129
|
+
self.digest == other.digest
|
|
130
|
+
and self.status == other.status
|
|
131
|
+
and self.file_path == other.file_path
|
|
132
|
+
and self.uploaded_at == other.uploaded_at
|
|
133
|
+
and self.enqueued_at == other.enqueued_at
|
|
134
|
+
and self.started_at == other.started_at
|
|
135
|
+
and self.failed_at == other.failed_at
|
|
136
|
+
and self.completed_at == other.completed_at
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
|
|
117
140
|
@property
|
|
118
141
|
def to_dict(self) -> dict:
|
|
119
142
|
return {
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/application/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/application/time_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/domain/entities/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/infrastructure/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/infrastructure/dynamo_table.py
RENAMED
|
File without changes
|
{documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/infrastructure/s3_bucket.py
RENAMED
|
File without changes
|
{documente_shared-0.1.37 → documente_shared-0.1.38}/documente_shared/infrastructure/sqs_queue.py
RENAMED
|
File without changes
|