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
Ekaterina
wendelin
Commits
804dc534
Commit
804dc534
authored
Jan 05, 2016
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up and use proper Query.
Add comments to do.
parent
226c6458
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/ERP5Site_handleDefaultFluentdIngestion.xml
.../erp5_wendelin/ERP5Site_handleDefaultFluentdIngestion.xml
+13
-10
No files found.
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/ERP5Site_handleDefaultFluentdIngestion.xml
View file @
804dc534
...
...
@@ -62,27 +62,30 @@
"""\n
from DateTime import DateTime\n
from zExceptions import NotFound\n
from Products.ZSQLCatalog.SQLCatalog import ComplexQuery\n
from Products.ZSQLCatalog.SQLCatalog import Query\n
\n
\n
now = DateTime()\n
request = context.REQUEST\n
portal_catalog = context.portal_catalog\n
\n
# keep backwards compatability\n
reference = request.get(\'reference\', \\\n
request.get(\'input_stream_ref\'))\n
reference = request.get(\'reference\')\n
data_chunk = request.get(\'data_chunk\')\n
\n
# XXX: add start_data and stop_date so all searches are time aware\n
default_kw = dict(validation_state = \'validated\')\n
\n
if data_chunk is not None and reference is not None:\n
# here we rely that fluentd will pass to us its tag which we use\n
# as reference but we can extract it sometimes from sensor data\n
# it thus depends on sensor and the fluentd topography\n
data_supply = portal_catalog.getResultValue( \\\n
portal_type = \'Data Supply\', \\\n
reference = reference, \\\n
**default_kw)\n
query=ComplexQuery(Query(portal_type = \'Data Supply\'),\n
Query(reference = reference),\n
Query(validation_state = \'validated\'),\n
# XXX: enable when final decision made if Data Supply is a\n
# Delivery or Supply\n
#Query( **{\'delivery.stop_date\':now, \'range\': \'max\'}),\n
#Query( **{\'delivery.start_date\':now, \'range\': \'min\'}),\n
operator="AND")\n
data_supply = portal_catalog.getResultValue(query=query)\n
\n
#context.log(data_supply)\n
# we can have multiple lines for each sensor and we filter out by reference\n
...
...
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