zou 0.20.75__py3-none-any.whl → 0.20.77__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.
- zou/__init__.py +1 -1
- zou/app/blueprints/files/resources.py +4 -31
- zou/app/blueprints/persons/resources.py +1 -1
- zou/app/blueprints/playlists/__init__.py +2 -0
- zou/app/blueprints/playlists/resources.py +50 -0
- zou/app/blueprints/user/resources.py +101 -83
- zou/app/models/notification.py +9 -1
- zou/app/models/person.py +5 -7
- zou/app/services/emails_service.py +63 -19
- zou/app/services/news_service.py +1 -3
- zou/app/services/notifications_service.py +39 -2
- zou/app/services/template_services.py +129 -0
- zou/app/services/time_spents_service.py +3 -3
- zou/app/services/user_service.py +22 -5
- zou/app/utils/commands.py +1 -1
- zou/migrations/versions/0c05b22194f3_add_performance_indexes.py +35 -0
- zou/migrations/versions/5f1620d191af_add_playlist_id_field_to_notification.py +46 -0
- zou/migrations/versions/71d546ace0ee_add_performance_indexes.py +32 -0
- {zou-0.20.75.dist-info → zou-0.20.77.dist-info}/METADATA +4 -4
- {zou-0.20.75.dist-info → zou-0.20.77.dist-info}/RECORD +24 -20
- {zou-0.20.75.dist-info → zou-0.20.77.dist-info}/WHEEL +0 -0
- {zou-0.20.75.dist-info → zou-0.20.77.dist-info}/entry_points.txt +0 -0
- {zou-0.20.75.dist-info → zou-0.20.77.dist-info}/licenses/LICENSE +0 -0
- {zou-0.20.75.dist-info → zou-0.20.77.dist-info}/top_level.txt +0 -0
zou/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.20.
|
|
1
|
+
__version__ = "0.20.77"
|
|
@@ -202,11 +202,6 @@ class WorkingFileFileResource(Resource):
|
|
|
202
202
|
|
|
203
203
|
|
|
204
204
|
class WorkingFilePathResource(Resource, ArgsMixin):
|
|
205
|
-
"""
|
|
206
|
-
Generate from file tree template a working file path based on several
|
|
207
|
-
parameters: task, software, mode, revision and separator. Revision can be
|
|
208
|
-
computed automatically as next revision if not given.
|
|
209
|
-
"""
|
|
210
205
|
|
|
211
206
|
@jwt_required()
|
|
212
207
|
def post(self, task_id):
|
|
@@ -215,7 +210,7 @@ class WorkingFilePathResource(Resource, ArgsMixin):
|
|
|
215
210
|
---
|
|
216
211
|
tags:
|
|
217
212
|
- Files
|
|
218
|
-
description: Generate file path based on several parameters
|
|
213
|
+
description: Generate file path based on several parameters
|
|
219
214
|
Revision can be computed automatically as next revision if not given.
|
|
220
215
|
parameters:
|
|
221
216
|
- in: path
|
|
@@ -338,12 +333,6 @@ class WorkingFilePathResource(Resource, ArgsMixin):
|
|
|
338
333
|
|
|
339
334
|
|
|
340
335
|
class EntityOutputFilePathResource(Resource, ArgsMixin):
|
|
341
|
-
"""
|
|
342
|
-
Generate from file tree template an output file path based on several
|
|
343
|
-
parameters: entity, output type, task type, revision, mode, name
|
|
344
|
-
and separator. Revision can be computed automatically as next revision if
|
|
345
|
-
not given.
|
|
346
|
-
"""
|
|
347
336
|
|
|
348
337
|
@jwt_required()
|
|
349
338
|
def post(self, entity_id):
|
|
@@ -352,7 +341,7 @@ class EntityOutputFilePathResource(Resource, ArgsMixin):
|
|
|
352
341
|
---
|
|
353
342
|
tags:
|
|
354
343
|
- Files
|
|
355
|
-
description: Generate file path based on several parameters
|
|
344
|
+
description: Generate file path based on several parameters entity, output type, task type, revision, mode, name and separator.
|
|
356
345
|
Revision can be computed automatically as next revision if not given.
|
|
357
346
|
parameters:
|
|
358
347
|
- in: path
|
|
@@ -474,11 +463,6 @@ class EntityOutputFilePathResource(Resource, ArgsMixin):
|
|
|
474
463
|
|
|
475
464
|
|
|
476
465
|
class InstanceOutputFilePathResource(Resource, ArgsMixin):
|
|
477
|
-
"""
|
|
478
|
-
Generate from file tree template an output file path based on several
|
|
479
|
-
parameters: asset instance, output type, task type, revision, mode, name and separator.
|
|
480
|
-
Revision can be computed automatically as next revision in case no revision is given in parameter.
|
|
481
|
-
"""
|
|
482
466
|
|
|
483
467
|
@jwt_required()
|
|
484
468
|
def post(self, asset_instance_id, temporal_entity_id):
|
|
@@ -487,7 +471,7 @@ class InstanceOutputFilePathResource(Resource, ArgsMixin):
|
|
|
487
471
|
---
|
|
488
472
|
tags:
|
|
489
473
|
- Files
|
|
490
|
-
description: "Generate file path based on several parameters
|
|
474
|
+
description: "Generate file path based on several parameters asset instance, output type, task type, revision, mode, name and separator.
|
|
491
475
|
Revision can be computed automatically as next revision in case no revision is given in parameter."
|
|
492
476
|
parameters:
|
|
493
477
|
- in: path
|
|
@@ -991,17 +975,6 @@ class CommentWorkingFileResource(Resource, ArgsMixin):
|
|
|
991
975
|
|
|
992
976
|
|
|
993
977
|
class NewEntityOutputFileResource(Resource, ArgsMixin):
|
|
994
|
-
"""
|
|
995
|
-
Output files are linked to entities. Each time a CG artist is satisfied
|
|
996
|
-
by what he did on a working file, he can create an output file that
|
|
997
|
-
will be linked to a target entity (an asset, a shot, a sequence, ...).
|
|
998
|
-
It keeps track of the working file at the origin of the output file.
|
|
999
|
-
An output type is required for better categorization (textures, caches,
|
|
1000
|
-
...). A task type can be set too to give the department related to the
|
|
1001
|
-
output file.
|
|
1002
|
-
|
|
1003
|
-
Revision is automatically set.
|
|
1004
|
-
"""
|
|
1005
978
|
|
|
1006
979
|
@jwt_required()
|
|
1007
980
|
def post(self, entity_id):
|
|
@@ -2602,4 +2575,4 @@ class GuessFromPathResource(Resource, ArgsMixin):
|
|
|
2602
2575
|
},
|
|
2603
2576
|
["sep", "/"],
|
|
2604
2577
|
]
|
|
2605
|
-
)
|
|
2578
|
+
)
|
|
@@ -7,6 +7,7 @@ from zou.app.blueprints.playlists.resources import (
|
|
|
7
7
|
BuildPlaylistMovieResource,
|
|
8
8
|
EntityPreviewsResource,
|
|
9
9
|
EpisodePlaylistsResource,
|
|
10
|
+
NotifyClientsResource,
|
|
10
11
|
ProjectPlaylistsResource,
|
|
11
12
|
ProjectAllPlaylistsResource,
|
|
12
13
|
ProjectBuildJobsResource,
|
|
@@ -44,6 +45,7 @@ routes = [
|
|
|
44
45
|
PlaylistZipDownloadResource,
|
|
45
46
|
),
|
|
46
47
|
("/data/projects/<project_id>/playlists/temp", TempPlaylistResource),
|
|
48
|
+
("/data/playlists/<playlist_id>/notify-clients", NotifyClientsResource),
|
|
47
49
|
]
|
|
48
50
|
|
|
49
51
|
blueprint = Blueprint("playlists", "playlists")
|
|
@@ -9,6 +9,7 @@ from zou.app.mixin import ArgsMixin
|
|
|
9
9
|
|
|
10
10
|
from zou.app.services import (
|
|
11
11
|
entities_service,
|
|
12
|
+
notifications_service,
|
|
12
13
|
playlists_service,
|
|
13
14
|
persons_service,
|
|
14
15
|
preview_files_service,
|
|
@@ -722,3 +723,52 @@ class TempPlaylistResource(Resource, ArgsMixin):
|
|
|
722
723
|
return (
|
|
723
724
|
playlists_service.generate_temp_playlist(task_ids, sort=sort) or []
|
|
724
725
|
)
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
class NotifyClientsResource(Resource, ArgsMixin):
|
|
729
|
+
|
|
730
|
+
@jwt_required()
|
|
731
|
+
def post(self, playlist_id):
|
|
732
|
+
"""
|
|
733
|
+
Notify clients that given playlist is ready.
|
|
734
|
+
|
|
735
|
+
---
|
|
736
|
+
tags:
|
|
737
|
+
- Playlists
|
|
738
|
+
parameters:
|
|
739
|
+
- in: path
|
|
740
|
+
name: playlist_id
|
|
741
|
+
required: true
|
|
742
|
+
schema:
|
|
743
|
+
type: string
|
|
744
|
+
format: uuid
|
|
745
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
746
|
+
requestBody:
|
|
747
|
+
required: true
|
|
748
|
+
content:
|
|
749
|
+
application/json:
|
|
750
|
+
schema:
|
|
751
|
+
type: object
|
|
752
|
+
properties:
|
|
753
|
+
studio_id:
|
|
754
|
+
type: string
|
|
755
|
+
format: uuid
|
|
756
|
+
example: a24a6ea4-ce75-4665-a070-57453082c25
|
|
757
|
+
responses:
|
|
758
|
+
'200':
|
|
759
|
+
description: Clients notified
|
|
760
|
+
content:
|
|
761
|
+
application/json:
|
|
762
|
+
schema:
|
|
763
|
+
type: object
|
|
764
|
+
properties:
|
|
765
|
+
status:
|
|
766
|
+
type: string
|
|
767
|
+
example: success
|
|
768
|
+
"""
|
|
769
|
+
studio_id = request.json.get("studio_id", None)
|
|
770
|
+
playlist = playlists_service.get_playlist(playlist_id)
|
|
771
|
+
project_id = playlist["project_id"]
|
|
772
|
+
user_service.check_manager_project_access(project_id)
|
|
773
|
+
notifications_service.notify_clients_playlist_ready(playlist, studio_id)
|
|
774
|
+
return {"status": "success"}
|