Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xanadu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
SYNERG
xanadu
Commits
66a27d36
Commit
66a27d36
authored
Jan 30, 2020
by
nilanjandaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dispatch daemon file download bug fixed
parent
b5471d2d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
dispatch_daemon/index.js
dispatch_daemon/index.js
+1
-1
dispatch_daemon/lib.js
dispatch_daemon/lib.js
+2
-0
No files found.
dispatch_daemon/index.js
View file @
66a27d36
...
@@ -30,7 +30,7 @@ client.on('message', function (topic, message) {
...
@@ -30,7 +30,7 @@ client.on('message', function (topic, message) {
if
(
message
.
type
===
"
execute
"
)
{
if
(
message
.
type
===
"
execute
"
)
{
console
.
log
(
"
function_id
"
,
function_id
);
console
.
log
(
"
function_id
"
,
function_id
);
if
(
!
fs
.
existsSync
(
local_repository
+
functionHash
))
{
if
(
!
fs
.
existsSync
(
local_repository
+
functionHash
))
{
libSupport
.
download
(
host_url
+
"
repository/
"
+
functionHash
,
local_repository
+
functionHash
).
then
(()
=>
{
libSupport
.
download
(
host_url
+
"
/
repository/
"
+
functionHash
,
local_repository
+
functionHash
).
then
(()
=>
{
if
(
runtime
===
"
isolate
"
)
if
(
runtime
===
"
isolate
"
)
execute
.
runIsolate
(
local_repository
+
functionHash
).
then
(
result
=>
{
execute
.
runIsolate
(
local_repository
+
functionHash
).
then
(
result
=>
{
...
...
dispatch_daemon/lib.js
View file @
66a27d36
...
@@ -3,6 +3,8 @@ var fs = require('fs');
...
@@ -3,6 +3,8 @@ var fs = require('fs');
var
download
=
function
(
url
,
dest
,
cb
)
{
var
download
=
function
(
url
,
dest
,
cb
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
url
);
var
file
=
fs
.
createWriteStream
(
dest
);
var
file
=
fs
.
createWriteStream
(
dest
);
var
request
=
http
.
get
(
url
,
function
(
response
)
{
var
request
=
http
.
get
(
url
,
function
(
response
)
{
response
.
pipe
(
file
);
response
.
pipe
(
file
);
...
...
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