diff --git a/taskvine/src/manager/vine_task.c b/taskvine/src/manager/vine_task.c index c9496bec69..aaae1d279f 100644 --- a/taskvine/src/manager/vine_task.c +++ b/taskvine/src/manager/vine_task.c @@ -1002,19 +1002,6 @@ char *vine_task_to_json(struct vine_task *t) return json; } -/* Converts an int64_t to a valid vine_task_func_exec_mode_t. - * Returns VINE_TASK_FUNC_EXEC_MODE_INVALID if there's no valid mode for the integer. */ -vine_task_func_exec_mode_t vine_task_func_exec_mode_from_int64_t(int64_t n) -{ - if (n == 1) { - return VINE_TASK_FUNC_EXEC_MODE_DIRECT; - } - if (n == 2) { - return VINE_TASK_FUNC_EXEC_MODE_FORK; - } - return VINE_TASK_FUNC_EXEC_MODE_INVALID; -} - /* Converts a string to a valid vine_task_func_exec_mode_t. * Returns VINE_TASK_FUNC_EXEC_MODE_INVALID if there's no valid mode for the string. */ vine_task_func_exec_mode_t vine_task_func_exec_mode_from_string(const char *exec_mode) diff --git a/taskvine/src/manager/vine_task.h b/taskvine/src/manager/vine_task.h index 13f56bf4d4..ec6889c096 100644 --- a/taskvine/src/manager/vine_task.h +++ b/taskvine/src/manager/vine_task.h @@ -165,7 +165,6 @@ const char *vine_task_state_to_string( vine_task_state_t task_state ); struct jx * vine_task_to_jx( struct vine_manager *q, struct vine_task *t ); char * vine_task_to_json(struct vine_task *t); -vine_task_func_exec_mode_t vine_task_func_exec_mode_from_int64_t(int64_t n); vine_task_func_exec_mode_t vine_task_func_exec_mode_from_string(const char *exec_mode); diff --git a/taskvine/src/worker/vine_worker.c b/taskvine/src/worker/vine_worker.c index f9ed5a6f59..191d55feeb 100644 --- a/taskvine/src/worker/vine_worker.c +++ b/taskvine/src/worker/vine_worker.c @@ -867,7 +867,7 @@ static struct vine_task *do_task_body(struct link *manager, int task_id, time_t /* Also set the total number determined by the manager. */ task->function_slots_total = n; } else if (sscanf(line, "func_exec_mode %" PRId64, &n) == 1) { - vine_task_func_exec_mode_t func_exec_mode = vine_task_func_exec_mode_from_int64_t(n); + vine_task_func_exec_mode_t func_exec_mode = n; if (func_exec_mode == VINE_TASK_FUNC_EXEC_MODE_INVALID) { debug(D_VINE | D_NOTICE, "invalid func_exec_mode from manager: %s", line); vine_task_delete(task);