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
Matevz Golob
wendelin
Commits
d472cee3
Commit
d472cee3
authored
Mar 28, 2017
by
Klaus Wölfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: data analysis was created multiple times for same ingestion in streaming case
parent
b948d032
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
7 deletions
+27
-7
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/ERP5Site_createDataAnalysisList.py
...al_skins/erp5_wendelin/ERP5Site_createDataAnalysisList.py
+5
-4
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/ERP5Site_executeDataAnalysisList.py
...l_skins/erp5_wendelin/ERP5Site_executeDataAnalysisList.py
+22
-3
No files found.
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/ERP5Site_createDataAnalysisList.py
View file @
d472cee3
from
DateTime
import
DateTime
from
DateTime
import
DateTime
from
Products.ZSQLCatalog.SQLCatalog
import
AndQuery
,
OrQuery
,
Query
,
SimpleQuery
from
Products.ZSQLCatalog.SQLCatalog
import
AndQuery
,
OrQuery
,
Query
,
NegatedQuery
,
SimpleQuery
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
portal_catalog
=
portal
.
portal_catalog
portal_catalog
=
portal
.
portal_catalog
...
@@ -11,12 +11,13 @@ query = AndQuery(
...
@@ -11,12 +11,13 @@ query = AndQuery(
Query
(
**
{
"stock.quantity"
:
"!=0"
}),
Query
(
**
{
"stock.quantity"
:
"!=0"
}),
Query
(
resource_portal_type
=
"Data Product"
),
Query
(
resource_portal_type
=
"Data Product"
),
# Should be improved to support mor than one analysis per ingestion
# Should be improved to support mor than one analysis per ingestion
SimpleQuery
(
causality_related_relative_url
=
None
),
SimpleQuery
(
parent_
causality_related_relative_url
=
None
),
OrQuery
(
OrQuery
(
Query
(
simulation_state
=
"stopped"
,
Query
(
simulation_state
=
"stopped"
,
use_relative_url
=
"use/big_data/ingestion/batch"
),
use_relative_url
=
"use/big_data/ingestion/batch"
),
Query
(
simulation_state
=
"started"
,
AndQuery
(
use_relative_url
=
"use/big_data/ingestion/stream"
)))
Query
(
simulation_state
=
"started"
),
Query
(
use_relative_url
=
"use/big_data/ingestion/stream"
))))
for
movement
in
portal_catalog
(
query
):
for
movement
in
portal_catalog
(
query
):
if
movement
.
DataIngestionLine_hasMissingRequiredItem
():
if
movement
.
DataIngestionLine_hasMissingRequiredItem
():
...
...
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/ERP5Site_executeDataAnalysisList.py
View file @
d472cee3
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
portal_catalog
=
portal
.
portal_catalog
for
data_analysis
in
portal_catalog
(
portal_type
=
"Data Analysis"
,
#search_kw = {
simulation_state
=
"started"
):
# 'simulation_state': 'started',
# 'portal_type': 'Data Analysis',
#}
#method_kw = {
# 'active_process': this_portal_type_active_process,
#}
#activate_kw = {
# 'tag': tag,
# 'priority': priority,
#}
#portal.portal_catalog.searchAndActivate(
# method_id='DataAnalysis_executeDataOperation',
# method_kw=method_kw,
# activate_kw=activate_kw,
# **search_kw)
for
data_analysis
in
portal
.
portal_catalog
(
portal_type
=
"Data Analysis"
,
simulation_state
=
"started"
):
data_analysis
.
activate
(
serialization_tag
=
str
(
data_analysis
.
getUid
()))
\
data_analysis
.
activate
(
serialization_tag
=
str
(
data_analysis
.
getUid
()))
\
.
DataAnalysis_executeDataOperation
()
.
DataAnalysis_executeDataOperation
()
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