Files
ray/src/common/state/db_client_table.c
T
Robert Nishihara d77b685a90 Global scheduler skeleton (#45)
* Initial scheduler commit

* global scheduler

* add global scheduler

* Implement global scheduler skeleton.

* Formatting.

* Allow local scheduler to be started without a connection to redis so that we can test it without a global scheduler.

* Fail if there are no local schedulers when the global scheduler receives a task.

* Initialize uninitialized value and formatting fix.

* Generalize local scheduler table to db client table.

* Remove code duplication in local scheduler and add flag for whether a task came from the global scheduler or not.

* Queue task specs in the local scheduler instead of tasks.

* Simple global scheduler tests, including valgrind.

* Factor out functions for starting processes.

* Fixes.
2016-11-18 19:57:51 -08:00

21 lines
736 B
C

#include "db_client_table.h"
#include "redis.h"
void db_client_table_subscribe(
db_handle *db_handle,
db_client_table_subscribe_callback subscribe_callback,
void *subscribe_context,
retry_info *retry,
db_client_table_done_callback done_callback,
void *user_context) {
db_client_table_subscribe_data *sub_data =
malloc(sizeof(db_client_table_subscribe_data));
utarray_push_back(db_handle->callback_freelist, &sub_data);
sub_data->subscribe_callback = subscribe_callback;
sub_data->subscribe_context = subscribe_context;
init_table_callback(db_handle, NIL_ID, __func__, sub_data, retry,
done_callback, redis_db_client_table_subscribe,
user_context);
}