Hello there,
I have created a task that calls Couchbase’s REST service method via CURL. Now, this task flushes the given bucket, effectively deletes every single document.
This is for development purposes and having entire database flushed the moment someone adds dependency or comment to a task in Gradle is not really something we would want.
The task in question looks like this:
task flushBucket() {
setGroup(sofomeCouchbaseGrp)
def auth = couchbaseAdmin + ':' + couchbasePassword
def link = couchbaseIp + ':' + couchbasePort + '/pools/default/buckets/' + couchbaseBucket + '/controller/doFlush'
['curl', '-X', 'POST', '-u', auth, link].execute()
}
Is there a way to stop this from happening? Maybe another way to execute a CURL command?
I believe this has something to do with caching and taking a snapshot of the output. Any way to circumvent this?
Thank you very much for your help.