mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Add IN_PROGRESS return code, handle for async backends
This commit is contained in:
parent
60aa987e06
commit
c7503654e8
6 changed files with 21 additions and 11 deletions
|
@ -228,7 +228,7 @@ OperationResult Redis::DoOpen(RecordValPtr options, OpenResultCallback* cb) {
|
|||
async_ctx->ev.addWrite = redisAddWrite;
|
||||
async_ctx->ev.delWrite = redisDelWrite;
|
||||
|
||||
return {ReturnCode::SUCCESS};
|
||||
return {ReturnCode::IN_PROGRESS};
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -247,8 +247,6 @@ OperationResult Redis::DoClose(OperationResultCallback* cb) {
|
|||
// TODO: handle response
|
||||
}
|
||||
|
||||
CompleteCallback(cb, {ReturnCode::SUCCESS});
|
||||
|
||||
redisAsyncFree(async_ctx);
|
||||
async_ctx = nullptr;
|
||||
|
||||
|
@ -306,7 +304,7 @@ OperationResult Redis::DoPut(ValPtr key, ValPtr value, bool overwrite, double ex
|
|||
++active_ops;
|
||||
}
|
||||
|
||||
return {ReturnCode::SUCCESS};
|
||||
return {ReturnCode::IN_PROGRESS};
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -329,7 +327,7 @@ OperationResult Redis::DoGet(ValPtr key, OperationResultCallback* cb) {
|
|||
|
||||
// There isn't a result to return here. That happens in HandleGetResult for
|
||||
// async operations.
|
||||
return {ReturnCode::SUCCESS};
|
||||
return {ReturnCode::IN_PROGRESS};
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -350,7 +348,7 @@ OperationResult Redis::DoErase(ValPtr key, OperationResultCallback* cb) {
|
|||
|
||||
++active_ops;
|
||||
|
||||
return {ReturnCode::SUCCESS};
|
||||
return {ReturnCode::IN_PROGRESS};
|
||||
}
|
||||
|
||||
void Redis::DoExpire() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue