elody 0.0.173__tar.gz → 0.0.175__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.
- {elody-0.0.173 → elody-0.0.175}/PKG-INFO +1 -1
- {elody-0.0.173 → elody-0.0.175}/pyproject.toml +1 -1
- {elody-0.0.173 → elody-0.0.175}/src/elody/job.py +36 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/permission_handler.py +2 -1
- {elody-0.0.173 → elody-0.0.175}/src/elody.egg-info/PKG-INFO +1 -1
- {elody-0.0.173 → elody-0.0.175}/LICENSE +0 -0
- {elody-0.0.173 → elody-0.0.175}/README.md +0 -0
- {elody-0.0.173 → elody-0.0.175}/setup.cfg +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/__init__.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/__init__.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/client.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/csv.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/error_codes.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/exceptions.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/loader.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/migration/__init__.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/migration/base_object_migrator.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/object_configurations/__init__.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/object_configurations/base_object_configuration.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/object_configurations/elody_configuration.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/object_configurations/job_configuration.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/__init__.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authentication/__init__.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authentication/base_user_tenant_validation_policy.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authentication/multi_tenant_policy.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/__init__.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/filter_generic_objects_policy.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/filter_generic_objects_policy_v2.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/generic_object_detail_policy.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/generic_object_mediafiles_policy.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/generic_object_metadata_policy.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/generic_object_relations_policy.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/generic_object_request_policy.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/generic_object_request_policy_v2.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/mediafile_derivatives_policy.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/mediafile_download_policy.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/multi_tenant_policy.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/tenant_request_policy.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/helpers.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/policies/tenant_id_resolver.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/schemas.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/util.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody/validator.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody.egg-info/SOURCES.txt +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody.egg-info/dependency_links.txt +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody.egg-info/requires.txt +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/elody.egg-info/top_level.txt +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/tests/__init_.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/tests/data.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/tests/unit/__init__.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/tests/unit/test_csv.py +0 -0
- {elody-0.0.173 → elody-0.0.175}/src/tests/unit/test_utils.py +0 -0
|
@@ -51,6 +51,33 @@ def start_job(
|
|
|
51
51
|
return job["_id"]
|
|
52
52
|
|
|
53
53
|
|
|
54
|
+
def add_document_to_job(
|
|
55
|
+
id,
|
|
56
|
+
id_of_document_job_was_initiated_for,
|
|
57
|
+
type_of_document_job_was_initiated_for,
|
|
58
|
+
*,
|
|
59
|
+
get_rabbit,
|
|
60
|
+
):
|
|
61
|
+
relations = []
|
|
62
|
+
if id_of_document_job_was_initiated_for and type_of_document_job_was_initiated_for:
|
|
63
|
+
relations.append(
|
|
64
|
+
{"key": id_of_document_job_was_initiated_for, "type": "isJobFor"}
|
|
65
|
+
)
|
|
66
|
+
document = {
|
|
67
|
+
"id": id,
|
|
68
|
+
"patch": {
|
|
69
|
+
"relations": (relations),
|
|
70
|
+
},
|
|
71
|
+
}
|
|
72
|
+
_post_crud_hook(crud="update", document=document, get_rabbit=get_rabbit)
|
|
73
|
+
__patch_document_job_was_initiated_for_v2(
|
|
74
|
+
id,
|
|
75
|
+
id_of_document_job_was_initiated_for,
|
|
76
|
+
type_of_document_job_was_initiated_for,
|
|
77
|
+
get_rabbit,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
54
81
|
def finish_job(
|
|
55
82
|
id,
|
|
56
83
|
id_of_document_job_was_initiated_for=None,
|
|
@@ -93,3 +120,12 @@ def __patch_document_job_was_initiated_for(id, type, get_rabbit):
|
|
|
93
120
|
"patch": {"relations": [{"key": id, "type": "hasJob"}]},
|
|
94
121
|
}
|
|
95
122
|
_post_crud_hook(crud="update", document=document, get_rabbit=get_rabbit)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def __patch_document_job_was_initiated_for_v2(job_id, document_id, type, get_rabbit):
|
|
126
|
+
if id and type:
|
|
127
|
+
document = {
|
|
128
|
+
"document_info_job_was_initiated_for": {"id": document_id, "type": type},
|
|
129
|
+
"patch": {"relations": [{"key": job_id, "type": "hasJob"}]},
|
|
130
|
+
}
|
|
131
|
+
_post_crud_hook(crud="update", document=document, get_rabbit=get_rabbit)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{elody-0.0.173 → elody-0.0.175}/src/elody/object_configurations/base_object_configuration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/filter_generic_objects_policy.py
RENAMED
|
File without changes
|
{elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/filter_generic_objects_policy_v2.py
RENAMED
|
File without changes
|
{elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/generic_object_detail_policy.py
RENAMED
|
File without changes
|
{elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/generic_object_mediafiles_policy.py
RENAMED
|
File without changes
|
{elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/generic_object_metadata_policy.py
RENAMED
|
File without changes
|
{elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/generic_object_relations_policy.py
RENAMED
|
File without changes
|
{elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/generic_object_request_policy.py
RENAMED
|
File without changes
|
{elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/generic_object_request_policy_v2.py
RENAMED
|
File without changes
|
{elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/mediafile_derivatives_policy.py
RENAMED
|
File without changes
|
{elody-0.0.173 → elody-0.0.175}/src/elody/policies/authorization/mediafile_download_policy.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|