elody 0.0.216__py3-none-any.whl → 0.0.217__py3-none-any.whl
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/job.py +3 -40
- elody/object_configurations/job_configuration.py +0 -14
- {elody-0.0.216.dist-info → elody-0.0.217.dist-info}/METADATA +1 -1
- {elody-0.0.216.dist-info → elody-0.0.217.dist-info}/RECORD +7 -7
- {elody-0.0.216.dist-info → elody-0.0.217.dist-info}/WHEEL +0 -0
- {elody-0.0.216.dist-info → elody-0.0.217.dist-info}/licenses/LICENSE +0 -0
- {elody-0.0.216.dist-info → elody-0.0.217.dist-info}/top_level.txt +0 -0
elody/job.py
CHANGED
|
@@ -9,12 +9,11 @@ _post_crud_hook = _config.crud()["post_crud_hook"]
|
|
|
9
9
|
def add_document_to_job(
|
|
10
10
|
id,
|
|
11
11
|
id_of_document_job_was_initiated_for,
|
|
12
|
-
type_of_document_job_was_initiated_for,
|
|
13
12
|
*,
|
|
14
13
|
get_rabbit,
|
|
15
14
|
):
|
|
16
15
|
relations = []
|
|
17
|
-
if id_of_document_job_was_initiated_for
|
|
16
|
+
if id_of_document_job_was_initiated_for:
|
|
18
17
|
relations.append(
|
|
19
18
|
{"key": id_of_document_job_was_initiated_for, "type": "isJobFor"}
|
|
20
19
|
)
|
|
@@ -25,12 +24,6 @@ def add_document_to_job(
|
|
|
25
24
|
},
|
|
26
25
|
}
|
|
27
26
|
_post_crud_hook(crud="update", document=document, get_rabbit=get_rabbit)
|
|
28
|
-
__patch_document_job_was_initiated_for(
|
|
29
|
-
id,
|
|
30
|
-
id_of_document_job_was_initiated_for,
|
|
31
|
-
type_of_document_job_was_initiated_for,
|
|
32
|
-
get_rabbit,
|
|
33
|
-
)
|
|
34
27
|
|
|
35
28
|
|
|
36
29
|
def init_job(
|
|
@@ -42,14 +35,13 @@ def init_job(
|
|
|
42
35
|
user_email=None,
|
|
43
36
|
parent_id=None,
|
|
44
37
|
id_of_document_job_was_initiated_for=None,
|
|
45
|
-
type_of_document_job_was_initiated_for=None,
|
|
46
38
|
) -> str:
|
|
47
39
|
relations = []
|
|
48
40
|
if parent_id:
|
|
49
41
|
relations.append({"key": parent_id, "type": "hasParentJob"})
|
|
50
|
-
if id_of_document_job_was_initiated_for
|
|
42
|
+
if id_of_document_job_was_initiated_for:
|
|
51
43
|
relations.append(
|
|
52
|
-
{"key": id_of_document_job_was_initiated_for, "type": "
|
|
44
|
+
{"key": id_of_document_job_was_initiated_for, "type": "isJobFor"}
|
|
53
45
|
)
|
|
54
46
|
|
|
55
47
|
job = _create(
|
|
@@ -69,19 +61,12 @@ def init_job(
|
|
|
69
61
|
_post_crud_hook(
|
|
70
62
|
crud="create", document=job, parent_id=parent_id, get_rabbit=get_rabbit
|
|
71
63
|
)
|
|
72
|
-
__patch_document_job_was_initiated_for(
|
|
73
|
-
job["_id"],
|
|
74
|
-
id_of_document_job_was_initiated_for,
|
|
75
|
-
type_of_document_job_was_initiated_for,
|
|
76
|
-
get_rabbit,
|
|
77
|
-
)
|
|
78
64
|
return job["_id"]
|
|
79
65
|
|
|
80
66
|
|
|
81
67
|
def start_job(
|
|
82
68
|
id,
|
|
83
69
|
id_of_document_job_was_initiated_for=None,
|
|
84
|
-
type_of_document_job_was_initiated_for=None,
|
|
85
70
|
*,
|
|
86
71
|
get_rabbit,
|
|
87
72
|
):
|
|
@@ -94,18 +79,11 @@ def start_job(
|
|
|
94
79
|
},
|
|
95
80
|
}
|
|
96
81
|
_post_crud_hook(crud="update", document=document, get_rabbit=get_rabbit)
|
|
97
|
-
__patch_document_job_was_initiated_for(
|
|
98
|
-
id,
|
|
99
|
-
id_of_document_job_was_initiated_for,
|
|
100
|
-
type_of_document_job_was_initiated_for,
|
|
101
|
-
get_rabbit,
|
|
102
|
-
)
|
|
103
82
|
|
|
104
83
|
|
|
105
84
|
def finish_job(
|
|
106
85
|
id,
|
|
107
86
|
id_of_document_job_was_initiated_for=None,
|
|
108
|
-
type_of_document_job_was_initiated_for=None,
|
|
109
87
|
*,
|
|
110
88
|
get_rabbit,
|
|
111
89
|
):
|
|
@@ -117,12 +95,6 @@ def finish_job(
|
|
|
117
95
|
},
|
|
118
96
|
}
|
|
119
97
|
_post_crud_hook(crud="update", document=document, get_rabbit=get_rabbit)
|
|
120
|
-
__patch_document_job_was_initiated_for(
|
|
121
|
-
id,
|
|
122
|
-
id_of_document_job_was_initiated_for,
|
|
123
|
-
type_of_document_job_was_initiated_for,
|
|
124
|
-
get_rabbit,
|
|
125
|
-
)
|
|
126
98
|
|
|
127
99
|
|
|
128
100
|
def fail_job(id, exception_message, *, get_rabbit):
|
|
@@ -136,12 +108,3 @@ def fail_job(id, exception_message, *, get_rabbit):
|
|
|
136
108
|
},
|
|
137
109
|
}
|
|
138
110
|
_post_crud_hook(crud="update", document=document, get_rabbit=get_rabbit)
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
def __patch_document_job_was_initiated_for(job_id, document_id, type, get_rabbit):
|
|
142
|
-
if id and type:
|
|
143
|
-
document = {
|
|
144
|
-
"document_info_job_was_initiated_for": {"id": document_id, "type": type},
|
|
145
|
-
"patch": {"relations": [{"key": job_id, "type": "hasJob"}]},
|
|
146
|
-
}
|
|
147
|
-
_post_crud_hook(crud="update", document=document, get_rabbit=get_rabbit)
|
|
@@ -42,20 +42,6 @@ class JobConfiguration(ElodyConfiguration):
|
|
|
42
42
|
"dams.job_created",
|
|
43
43
|
document,
|
|
44
44
|
)
|
|
45
|
-
if parent_id := kwargs.get("parent_id"):
|
|
46
|
-
send_cloudevent(
|
|
47
|
-
get_rabbit(),
|
|
48
|
-
getenv("MQ_EXCHANGE", "dams"),
|
|
49
|
-
"dams.job_changed",
|
|
50
|
-
{
|
|
51
|
-
"id": parent_id,
|
|
52
|
-
"patch": {
|
|
53
|
-
"relations": [
|
|
54
|
-
{"key": document["_id"], "type": "isParentJobOf"}
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
)
|
|
59
45
|
elif crud == "update":
|
|
60
46
|
send_cloudevent(
|
|
61
47
|
get_rabbit(),
|
|
@@ -4,7 +4,7 @@ elody/client.py,sha256=15SBfnLHJXXY5Vf5BnkWdjtvkH21E_AsWTzm2-zcbf0,8799
|
|
|
4
4
|
elody/csv.py,sha256=f8HphE-KC2OqKFzV0HiifWBgMHb3g0EA_Y82o_6JEiE,16761
|
|
5
5
|
elody/error_codes.py,sha256=d3wNPZU0HFMyl8xN95ciNd6QD94al1tX18h6HiqiAHo,4310
|
|
6
6
|
elody/exceptions.py,sha256=5KSw2sPCZz3lDIJX4LiR2iL9n4m4KIil04D1d3X5rd0,968
|
|
7
|
-
elody/job.py,sha256=
|
|
7
|
+
elody/job.py,sha256=4dNpTWDdui53VqXfPsDNoTZ9MQohfqXnT2AsuI8q5Ec,2900
|
|
8
8
|
elody/loader.py,sha256=yNakab07ja478gZaIC277n8Wf8SJ7_P3q-Z39BDdWQc,5419
|
|
9
9
|
elody/schemas.py,sha256=WtKdZEAX-PtEuAaRohyS3Md8H4-8yKVXMkHfCQ2SDR4,4676
|
|
10
10
|
elody/util.py,sha256=QqcqkV7GZ_1p4Uf_GJnc_nfAJt0mkBGzQ7-wCxMJ1ZM,9080
|
|
@@ -14,7 +14,7 @@ elody/migration/base_object_migrator.py,sha256=n8uvgGfjEUy60G47RD7Y-oxp1vHLOauwP
|
|
|
14
14
|
elody/object_configurations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
elody/object_configurations/base_object_configuration.py,sha256=8wyUq_zqRkGb4Mp198pyxOaGdz2WMZzVOO65s1SDCRw,7393
|
|
16
16
|
elody/object_configurations/elody_configuration.py,sha256=pktiS14jeZja-G6677Hse5zzeUpH5rHRzy7YK-H2wNU,10519
|
|
17
|
-
elody/object_configurations/job_configuration.py,sha256
|
|
17
|
+
elody/object_configurations/job_configuration.py,sha256=-dGhXGfCewLEcPLjkBiSgwUa1dPty6OMm8b0IOUOUgo,1507
|
|
18
18
|
elody/object_configurations/saved_search_configuration.py,sha256=ddOry4EqYOeEKRF7q2M_fHoqZv8DXpQjFq8VaZ7jhVI,732
|
|
19
19
|
elody/policies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
elody/policies/helpers.py,sha256=0mlTd-hu2TKwVNH3ov4yCEV-P_f2k7XFJ7XYUtGTjXk,2239
|
|
@@ -35,13 +35,13 @@ elody/policies/authorization/mediafile_derivatives_policy.py,sha256=OwNpbS8i7-Lz
|
|
|
35
35
|
elody/policies/authorization/mediafile_download_policy.py,sha256=XMsKavBucmTh4W1kWOzpFWxJ_ZXgHVK1RS7JB4HjtQo,1979
|
|
36
36
|
elody/policies/authorization/multi_tenant_policy.py,sha256=SA9H7SBjzuh8mY3gYN7pDG8TV7hdI3GEUtNeiZeNL3M,3164
|
|
37
37
|
elody/policies/authorization/tenant_request_policy.py,sha256=dEgblwRAqwWVcE-O7Jn8hVL3OnwDlQhDEOcPlcElBrk,1185
|
|
38
|
-
elody-0.0.
|
|
38
|
+
elody-0.0.217.dist-info/licenses/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
|
39
39
|
tests/__init_.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
40
|
tests/data.py,sha256=Q3oxduf-E3m-Z5G_p3fcs8jVy6g10I7zXKL1m94UVMI,2906
|
|
41
41
|
tests/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
42
42
|
tests/unit/test_csv.py,sha256=NQaOhehfQ4GuXku0Y1SA8DYjJeqqidbF50zEHAi8RZA,15923
|
|
43
43
|
tests/unit/test_utils.py,sha256=g63szcEZyHhCOtrW4BnNbcgVca3oYPIOLjBdIzNwwN0,8784
|
|
44
|
-
elody-0.0.
|
|
45
|
-
elody-0.0.
|
|
46
|
-
elody-0.0.
|
|
47
|
-
elody-0.0.
|
|
44
|
+
elody-0.0.217.dist-info/METADATA,sha256=g8halEqhgIY79MS5CoCPvPek-cV4EbqaEF-DjBFWBGA,23358
|
|
45
|
+
elody-0.0.217.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
46
|
+
elody-0.0.217.dist-info/top_level.txt,sha256=E0mImupLj0KmtUUCXRYEoLDRaSkuiGaOIIseAa0oQ-M,21
|
|
47
|
+
elody-0.0.217.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|