Use redismodules for task table and result table. (#156)

* Switch to using redis modules for task table.

* Switch to using redis modules for the task table.

* Fix some tests.

* Fix naming and remove code duplication.

* Remove duplication in redis modules and add more cleanups.

* Address comments.
This commit is contained in:
Robert Nishihara
2016-12-25 23:57:05 -08:00
committed by Philipp Moritz
parent d6695c867a
commit 985c424172
14 changed files with 456 additions and 500 deletions
+7 -2
View File
@@ -109,8 +109,13 @@ void assign_task_to_worker(local_scheduler_state *state,
if (state->db != NULL) {
task *task =
alloc_task(spec, TASK_STATUS_RUNNING, get_db_client_id(state->db));
task_table_update(state->db, task, (retry_info *) &photon_retry, NULL,
NULL);
if (from_global_scheduler) {
task_table_update(state->db, task, (retry_info *) &photon_retry, NULL,
NULL);
} else {
task_table_add_task(state->db, task, (retry_info *) &photon_retry, NULL,
NULL);
}
/* Record which task this worker is executing. This will be freed in
* process_message when the worker sends a GET_TASK message to the local
* scheduler. */