Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
ssmp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vaclab
ssmp
Commits
4722b114
Commit
4722b114
authored
8 years ago
by
wactbprot
Browse files
Options
Downloads
Patches
Plain Diff
kein delete der vl_db_work mehr
parent
89de72bf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dbs.js
+23
-40
23 additions, 40 deletions
dbs.js
with
23 additions
and
40 deletions
dbs.js
+
23
−
40
View file @
4722b114
...
...
@@ -22,13 +22,7 @@ module.exports = function(cb){
headers
:
{
"
content-type
"
:
"
application/json
"
},
method
:
'
PUT
'
}
,
delopt
=
{
hostname
:
datdb
.
server
,
port
:
datdb
.
port
,
path
:
"
/
"
+
datdb
.
name
,
headers
:
{
"
content-type
"
:
"
application/json
"
},
method
:
'
DELETE
'
}
,
datopt
=
{
hostname
:
datdb
.
server
,
port
:
datdb
.
port
,
...
...
@@ -57,50 +51,39 @@ module.exports = function(cb){
console
.
log
(
"
create dump database:
"
+
dumpdb
.
name
+
"
@
"
+
dumpdb
.
server
);
console
.
log
(
"
...................................................
"
);
var
delreq
=
http
.
request
(
delopt
,
function
(
res
){
var
datreq
=
http
.
request
(
datopt
,
function
(
res
){
console
.
log
(
"
--------------------------------------------------
"
);
console
.
log
(
"
dele
te work database:
"
+
datdb
.
name
+
"
@
"
+
datdb
.
server
);
console
.
log
(
"
crea
te work database:
"
+
datdb
.
name
+
"
@
"
+
datdb
.
server
);
console
.
log
(
"
...................................................
"
);
var
datreq
=
http
.
request
(
datopt
,
function
(
res
){
console
.
log
(
"
--------------------------------------------------
"
);
console
.
log
(
"
create work database:
"
+
datdb
.
name
+
"
@
"
+
datdb
.
server
);
console
.
log
(
"
...................................................
"
);
var
replreq
=
http
.
request
(
replopt
,
function
(
res
){
console
.
log
(
"
--------------------------------------------------
"
);
console
.
log
(
"
replicate vl_db to work database
"
);
console
.
log
(
"
...................................................
"
);
if
(
_
.
isFunction
(
cb
)){
cb
();
}
});
replreq
.
on
(
'
error
'
,
function
(
e
){
console
.
log
(
"
error on attempt to replicate database
"
);
});
var
replreq
=
http
.
request
(
replopt
,
function
(
res
){
console
.
log
(
"
--------------------------------------------------
"
);
console
.
log
(
"
replicate vl_db to work database
"
);
console
.
log
(
"
...................................................
"
);
if
(
_
.
isFunction
(
cb
)){
cb
();
}
});
replreq
.
write
(
repldat
,
function
(){
console
.
log
(
"
try replicate database
"
);
});
replreq
.
end
(
function
(){
console
.
log
(
"
end replicate database
"
);
});
});
replreq
.
on
(
'
error
'
,
function
(
e
){
console
.
log
(
"
error on attempt to replicate database
"
);
});
datreq
.
on
(
'
error
'
,
function
(
e
){
console
.
log
(
"
error on attempt to create work
database
"
);
replreq
.
write
(
repldat
,
function
(){
console
.
log
(
"
try replicate
database
"
);
});
datreq
.
end
();
replreq
.
end
(
function
(){
console
.
log
(
"
end replicate database
"
);
});
});
d
el
req
.
on
(
'
error
'
,
function
(
e
){
console
.
log
(
"
error on attempt to
dele
te work database
"
);
d
at
req
.
on
(
'
error
'
,
function
(
e
){
console
.
log
(
"
error on attempt to
crea
te work database
"
);
});
d
el
req
.
end
();
d
at
req
.
end
();
});
dumpreq
.
on
(
'
error
'
,
function
(
e
){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment