Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
wendelin
Commits
ae45e8ac
Commit
ae45e8ac
authored
Jan 15, 2024
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code style + comments.
parent
4acd0517
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/ERP5Site_createDataAnalysisList.py
...al_skins/erp5_wendelin/ERP5Site_createDataAnalysisList.py
+12
-10
No files found.
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/ERP5Site_createDataAnalysisList.py
View file @
ae45e8ac
"""
Create Data Analyses objects based on Data Transformations.
Usually called periodically from respective ERP5 Alarm.
"""
from
DateTime
import
DateTime
from
DateTime
import
DateTime
from
Products.ZSQLCatalog.SQLCatalog
import
AndQuery
,
OrQuery
,
Query
from
Products.ZSQLCatalog.SQLCatalog
import
AndQuery
,
OrQuery
,
Query
from
Products.ERP5Type.Errors
import
UnsupportedWorkflowMethod
from
Products.ERP5Type.Errors
import
UnsupportedWorkflowMethod
...
@@ -36,6 +40,7 @@ for movement in portal_catalog(query = query):
...
@@ -36,6 +40,7 @@ for movement in portal_catalog(query = query):
data_supply_list
=
delivery
.
getSpecialiseValueList
(
portal_type
=
"Data Supply"
)
data_supply_list
=
delivery
.
getSpecialiseValueList
(
portal_type
=
"Data Supply"
)
composed_data_supply
=
data_supply
.
asComposedDocument
()
composed_data_supply
=
data_supply
.
asComposedDocument
()
# Get applicable transformation
# Get applicable transformation
transformation_list
=
[]
transformation_list
=
[]
for
transformation
in
composed_data_supply
.
getSpecialiseValueList
(
portal_type
=
"Data Transformation"
):
for
transformation
in
composed_data_supply
.
getSpecialiseValueList
(
portal_type
=
"Data Transformation"
):
...
@@ -52,9 +57,7 @@ for movement in portal_catalog(query = query):
...
@@ -52,9 +57,7 @@ for movement in portal_catalog(query = query):
transformation_list
.
append
(
transformation
)
transformation_list
.
append
(
transformation
)
for
transformation
in
transformation_list
:
for
transformation
in
transformation_list
:
is_shared_data_analysis
=
False
is_shared_data_analysis
=
False
data_analysis_id
=
"%s-%s-%s"
%
(
today
,
delivery
.
getId
(),
transformation
.
getId
())
data_analysis_id
=
"%s-%s-%s"
%
(
today
,
delivery
.
getId
(),
transformation
.
getId
())
# Check if analysis already exists
# Check if analysis already exists
...
@@ -180,7 +183,6 @@ for movement in portal_catalog(query = query):
...
@@ -180,7 +183,6 @@ for movement in portal_catalog(query = query):
item_resource_uid
=
resource
.
getUid
(),
item_resource_uid
=
resource
.
getUid
(),
item_source_relative_url
=
data_analysis
.
getSource
())
item_source_relative_url
=
data_analysis
.
getSource
())
if
data_analysis
.
getDestinationProjectValue
()
is
not
None
:
if
data_analysis
.
getDestinationProjectValue
()
is
not
None
:
item_query_dict
[
"item_project_relative_url"
]
=
data_analysis
.
getDestinationProject
()
item_query_dict
[
"item_project_relative_url"
]
=
data_analysis
.
getDestinationProject
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment