Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
N
node-bigstream
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bs
node-bigstream
Commits
7c594cf6
Commit
7c594cf6
authored
Jan 27, 2017
by
project
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
60ee4721
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
execute.js
plugins/di/di-agritronics/execute.js
+6
-3
No files found.
plugins/di/di-agritronics/execute.js
View file @
7c594cf6
...
...
@@ -10,6 +10,8 @@ function execute_function(context,response){
var
data
=
'hello world'
;
var
ct
=
new
Date
().
getTime
();
let
result
=
{
"object_type"
:
'agritronic'
,
"station_id"
:
param
.
station_id
,
...
...
@@ -22,9 +24,10 @@ function execute_function(context,response){
async
.
whilst
(
function
()
{
return
idx
<
param
.
data_types
.
length
;},
function
(
callback
)
{
let
dtype
=
param
.
data_types
[
idx
].
type
;
let
node_id
=
param
.
data_types
[
idx
].
node_id
;
let
ts
=
memstore
.
getItem
(
`
${
param
.
station_id
}
-
${
dtype
}
`
);
if
(
typeof
(
ts
)
===
'undefined'
)
ts
=
`
${
param
.
init_observed_date
}
,
${
param
.
init_observed_time
}
`
;
let
url
=
param
.
url
+
`?appkey=
${
param
.
appkey
}
&p=
${
param
.
station_id
}
,
${
node_id
}
,
${
dtype
}
,
${
ts
}
`
;
let
lts
=
memstore
.
getItem
(
`
${
param
.
station_id
}
-
${
dtype
}
`
);
console
.
log
(
`memstore:
${
param
.
station_id
}
-
${
dtype
}
=
${
lts
}
`
);
if
(
typeof
(
lts
)
===
'undefined'
)
lts
=
`
${
param
.
init_observed_date
}
,
${
param
.
init_observed_time
}
`
;
let
url
=
param
.
url
+
`?appkey=
${
param
.
appkey
}
&p=
${
param
.
station_id
}
,
${
node_id
}
,
${
dtype
}
,
${
lts
}
`
;
idx
++
;
getData
(
url
).
then
((
data
)
=>
{
if
(
data
.
search
(
"denied"
)
===
-
1
){
...
...
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