squash! server : add server_task_type field to server_task_result
Add a check for the server_task_type in the server.cpp file. This is to ensure that the server_task_type is correct when the server_task_type is SERVER_TASK_TYPE_SLOT_RESTORE. This is because the server_task_type is SERVER_TASK_TYPE_SLOT_SAVE when the server_task_type is SERVER_TASK_TYPE_SLOT_RESTORE.
This commit is contained in:
parent
c6f6579785
commit
bfc342ca97
1 changed files with 5 additions and 1 deletions
|
@ -3738,7 +3738,11 @@ int main(int argc, char ** argv) {
|
|||
return;
|
||||
}
|
||||
GGML_ASSERT(result.get() != nullptr);
|
||||
GGML_ASSERT(result.get()->get_server_task_type() == type);
|
||||
if (type == SERVER_TASK_TYPE_SLOT_RESTORE) {
|
||||
GGML_ASSERT(result.get()->get_server_task_type() == SERVER_TASK_TYPE_SLOT_SAVE);
|
||||
} else {
|
||||
GGML_ASSERT(result.get()->get_server_task_type() == type);
|
||||
}
|
||||
res_ok(res, result->to_json());
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue