garden20 / garden-core Goto Github PK
View Code? Open in Web Editor NEWSmall surface api to install, update and manage garden apps. Use in node, requirejs, and browser global.
Small surface api to install, update and manage garden apps. Use in node, requirejs, and browser global.
if possible, check to see if replication is working (rate of bytes being transferred or percentage of ddoc size) before failing over.
Depending on revisions of the database, the ddoc may or may not get updated. So garden-core command will return "update succeeded" yet the ddoc was not actually updated, it only confirms the _replicate command returned 200. This can particularly be an issue if you are switching between markets or update an ddoc manually via HTTP. The ddoc _rev property and replication algorithms need to be in sync between markets for a _replicate call to actually change something. I'm starting to think replication is not what we want to use to install apps/ddocs. We want to do a brute force install by taking a ddoc from a market or one location and then overwriting another ddoc (use existing _rev) in a new location, not a conventional replication? @ryanramage @garethbowen @browndav thoughts?
It would also be nice to have an option to upload a ddoc.json file so an update or install can happen without dashboard even having an internet connection.
This will remove the app that has that db name
vm@toaster:/srv/settings/medic-core/nginx $ garden-core http://dev.medicmobile.org/market/_design/market/_rewrite/details/kujua-lite http://admin:password@localhost:5984/ test1
30% Installing App
40% Replication timeout
40% Falling back to memory transfer
{ [Error: conflict
Document update conflict.]
error: 'conflict',
reason: 'Document update conflict.',
response:
{ _readableState:
{ highWaterMark: 16384,
buffer: [],
length: 0,
pipes: null,
pipesCount: 0,
flowing: false,
ended: true,
endEmitted: true,
reading: false,
calledRead: true,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
objectMode: false,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: false,
domain: null,
_events: { end: [Object], data: [Function], readable: [Function] },
_maxListeners: 10,
socket:
{ _connecting: false,
_handle: [Object],
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: false,
onend: null,
destroyed: false,
errorEmitted: false,
bytesRead: 247,
_bytesDispatched: 10222021,
_pendingData: null,
_pendingEncoding: '',
parser: null,
_httpMessage: [Object],
ondata: null },
connection:
{ _connecting: false,
_handle: [Object],
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: false,
onend: null,
destroyed: false,
errorEmitted: false,
bytesRead: 247,
_bytesDispatched: 10222021,
_pendingData: null,
_pendingEncoding: '',
parser: null,
_httpMessage: [Object],
ondata: null },
httpVersion: '1.1',
complete: true,
headers:
{ server: 'CouchDB/1.4.0 (Erlang OTP/R15B03)',
date: 'Thu, 13 Feb 2014 00:29:04 GMT',
'content-type': 'application/json',
'content-length': '58',
'cache-control': 'must-revalidate' },
trailers: {},
_pendings: [],
_pendingIndex: 0,
url: '',
method: null,
statusCode: 409,
client:
{ _connecting: false,
_handle: [Object],
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: false,
onend: null,
destroyed: false,
errorEmitted: false,
bytesRead: 247,
_bytesDispatched: 10222021,
_pendingData: null,
_pendingEncoding: '',
parser: null,
_httpMessage: [Object],
ondata: null },
_consuming: true,
_dumped: false,
httpVersionMajor: 1,
httpVersionMinor: 1,
upgrade: false,
req:
{ domain: null,
_events: [Object],
_maxListeners: 10,
output: [],
outputEncodings: [],
writable: true,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_hasBody: true,
_trailer: '',
finished: true,
_hangupClose: false,
socket: [Object],
connection: [Object],
agent: [Object],
socketPath: undefined,
method: 'PUT',
path: '//test1/kujua-lite',
_headers: [Object],
_headerNames: [Object],
_header: 'PUT //test1/kujua-lite HTTP/1.1\r\nHost: localhost\r\nAccept: application/json\r\nContent-Type: application/json\r\nContent-Length: 10221818\r\nAuthorization: Basic YWRtaW46MTIzcXdlISQ=\r\nConnection: keep-alive\r\n\r\n',
_headerSent: true,
parser: null,
res: [Circular] },
pipe: [Function],
addListener: [Function],
on: [Function],
pause: [Function],
resume: [Function],
read: [Function] } }
vm@toaster:/srv/settings/medic-core/nginx $
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.