Commit 4a91c674 authored by project's avatar project

--no commit message

--no commit message
parent 439140c7
{ {
"type" : "rabbitmq", "type" : "rabbitmq",
"url" : "amqp://bigmaster.igridproject.info" "url" : "amqp://lab1.igridproject.info"
} }
...@@ -55,6 +55,7 @@ SS.prototype.amqp_start = function() ...@@ -55,6 +55,7 @@ SS.prototype.amqp_start = function()
}else{ }else{
console.log('SS:AMQP START\t\t\t[ERR]'); console.log('SS:AMQP START\t\t\t[ERR]');
console.log(err.message); console.log(err.message);
process.exit(1);
} }
}); });
} }
......
...@@ -43,22 +43,34 @@ var database = Db.create({'repos_dir':'D:/testfile'}); ...@@ -43,22 +43,34 @@ var database = Db.create({'repos_dir':'D:/testfile'});
// } // }
// } // }
var req = { // var req = {
'object_type' : 'storage_request', // 'object_type' : 'storage_request',
'command' : 'write', // 'command' : 'write',
'param' : { // 'param' : {
'storage_name' : 'gcs.file.test', // 'storage_name' : 'gcs.file.test',
'meta' : {'name':'gcs'}, // 'meta' : {'name':'gcs'},
'data' : { // 'data' : {
'type' : 'bsdata', // 'type' : 'bsdata',
'value' : { // 'value' : {
'data_type' : 'string', // 'data_type' : 'string',
'data' : 'AA00FFCC' // 'data' : 'AA00FFCC'
} // }
} // }
} // }
// }
//
// database.request(req,function(err,res){
// console.log(res);
// });
var dateFormat = require('dateformat');
function getCurrentTime()
{
var curDate = new Date();
var unix = Math.floor(curDate/1000) * 1000;
var sqlDate = dateFormat(unix, "yyyy-mm-dd H:MM:ss");
//var unix = Math.round(curDate/1000) * 1000;
return {date:curDate,sql:sqlDate,ts:unix}
} }
database.request(req,function(err,res){ console.log(getCurrentTime());
console.log(res);
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment