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
6a4b137f
Commit
6a4b137f
authored
May 28, 2017
by
project
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
54193fcc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
11 deletions
+23
-11
perform.js
plugins/di/di-http-request/perform.js
+8
-2
test.js
test/test.js
+15
-9
No files found.
plugins/di/di-http-request/perform.js
View file @
6a4b137f
...
...
@@ -6,10 +6,16 @@ function execute_function(context,response){
var
param
=
context
.
jobconfig
.
data_in
.
param
;
var
memstore
=
context
.
task
.
memstore
var
output_type
=
'text'
var
output_type
=
'text'
;
var
url
=
param
.
url
;
request
(
url
,
function
(
error
,
resp
,
body
)
{
var
encode
=
'utf8'
;
if
(
param
.
encoding
==
'binary'
){
encode
=
null
;
output_type
=
'binary'
}
request
({
'url'
:
url
,
'encoding'
:
null
,
function
(
error
,
resp
,
body
)
{
if
(
!
error
&&
resp
.
statusCode
==
200
)
{
response
.
success
(
body
);
}
else
{
...
...
test/test.js
View file @
6a4b137f
...
...
@@ -219,15 +219,15 @@ var job_config = {
// });
var
client
=
redis
.
createClient
(
'redis://lab1.igridproject.info:6379/1'
);
//var client = redis.createClient('redis://localhost:9736/1');
client
.
hgetall
(
'bs:regis:triggers'
,
function
(
err
,
rep
)
{
Object
.
keys
(
rep
).
forEach
(
function
(
a
,
b
){
console
.
log
(
b
);
})
//console.log(Object.keys(rep));
});
//
var client = redis.createClient('redis://lab1.igridproject.info:6379/1');
//
//
var client = redis.createClient('redis://localhost:9736/1');
//
//
client.hgetall('bs:regis:triggers', function (err, rep) {
//
Object.keys(rep).forEach(function(a,b){
//
console.log(b);
//
})
//
//console.log(Object.keys(rep));
//
});
//client.hset('bs:regis:triggers','job01',JSON.stringify(job_config));
// var CronList = ctx.getLib('lib/mems/cronlist');
...
...
@@ -240,3 +240,9 @@ client.hgetall('bs:regis:triggers', function (err, rep) {
// crons.update(function(err){
// console.log(crons.list);
// });
var
wUrl
=
"http://203.155.220.231/Radar/pics/zfiltered.jpg"
;
var
request
=
require
(
'request'
).
defa
request
.
get
(
wUrl
,
function
(
err
,
res
,
body
)
{
console
.
log
(
body
);
});
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