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
10e0f94a
Commit
10e0f94a
authored
Dec 22, 2016
by
project
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
128cb008
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 @
10e0f94a
...
@@ -5,12 +5,13 @@ function execute_function(context,response){
...
@@ -5,12 +5,13 @@ function execute_function(context,response){
var
job_id
=
context
.
jobconfig
.
job_id
;
var
job_id
=
context
.
jobconfig
.
job_id
;
var
transaction_id
=
context
.
transaction_id
;
var
transaction_id
=
context
.
transaction_id
;
var
param
=
context
.
jobconfig
.
data_in
.
param
;
var
param
=
context
.
jobconfig
.
data_in
.
param
;
var
memstore
=
context
.
task
.
memstore
var
memstore
=
context
.
task
.
memstore
;
var
output_type
=
'
jsonobject'
var
output_type
=
'
object/agritronics'
;
var
data
=
'hello world'
;
var
data
=
'hello world'
;
let
result
=
{
let
result
=
{
"object_type"
:
'agritronic'
,
"station_id"
:
param
.
station_id
,
"station_id"
:
param
.
station_id
,
"data"
:[]
"data"
:[]
};
};
...
@@ -21,7 +22,9 @@ function execute_function(context,response){
...
@@ -21,7 +22,9 @@ function execute_function(context,response){
async
.
whilst
(
function
()
{
return
idx
<
param
.
data_types
.
length
;},
function
(
callback
)
{
async
.
whilst
(
function
()
{
return
idx
<
param
.
data_types
.
length
;},
function
(
callback
)
{
let
dtype
=
param
.
data_types
[
idx
].
type
;
let
dtype
=
param
.
data_types
[
idx
].
type
;
let
node_id
=
param
.
data_types
[
idx
].
node_id
;
let
node_id
=
param
.
data_types
[
idx
].
node_id
;
let
url
=
param
.
url
+
`?appkey=
${
param
.
appkey
}
&p=
${
param
.
station_id
}
,
${
node_id
}
,
${
dtype
}
,
${
param
.
init_date_observed
}
,
${
param
.
init_time_observed
}
`
;
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
}
`
;
idx
++
;
idx
++
;
getData
(
url
).
then
((
data
)
=>
{
getData
(
url
).
then
((
data
)
=>
{
if
(
data
.
search
(
"denied"
)
===
-
1
){
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