Commit ca761af1 authored by Stanislav Bohm's avatar Stanislav Bohm

ENH: New naming scheme (prefix /loom)

parent eff3d653
......@@ -12,14 +12,6 @@ class Task(object):
id = None
config = ""
"""
def __init__(self, config, inputs=()):
self.id = None
self.task_type = task_type
self.config = config
self.inputs = inputs
"""
def set_message(self, msg, symbols):
msg.config = self.config
msg.task_type = symbols[self.task_type]
......@@ -28,19 +20,19 @@ class Task(object):
class Plan(object):
TASK_BASE_GET = "base/get"
TASK_BASE_SLICE = "base/slice"
TASK_BASE_GET = "loom/base/get"
TASK_BASE_SLICE = "loom/base/slice"
TASK_DATA_CONST = "data/const"
TASK_DATA_MERGE = "data/merge"
TASK_DATA_OPEN = "data/open"
TASK_DATA_SPLIT = "data/split"
TASK_DATA_CONST = "loom/data/const"
TASK_DATA_MERGE = "loom/data/merge"
TASK_DATA_OPEN = "loom/data/open"
TASK_DATA_SPLIT = "loom/data/split"
TASK_ARRAY_MAKE = "array/make"
TASK_ARRAY_MAKE = "loom/array/make"
TASK_RUN = "run/run"
TASK_RUN = "loom/run/run"
TASK_SCHEDULER_DSLICE = "scheduler/dslice"
TASK_SCHEDULER_DSLICE = "loom/scheduler/dslice"
u64 = struct.Struct("<Q")
u64u64 = struct.Struct("<QQ")
......
......@@ -82,20 +82,20 @@ Worker::Worker(uv_loop_t *loop,
void Worker::register_basic_tasks()
{
// Base
add_task_factory<GetTask>("base/get");
add_task_factory<SliceTask>("base/slice");
add_task_factory<GetTask>("loom/base/get");
add_task_factory<SliceTask>("loom/base/slice");
// RawData
add_task_factory<ConstTask>("data/const");
add_task_factory<MergeTask>("data/merge");
add_task_factory<OpenTask>("data/open");
add_task_factory<SplitTask>("data/split");
add_task_factory<ConstTask>("loom/data/const");
add_task_factory<MergeTask>("loom/data/merge");
add_task_factory<OpenTask>("loom/data/open");
add_task_factory<SplitTask>("loom/data/split");
// Arrays
add_task_factory<ArrayMakeTask>("array/make");
add_task_factory<ArrayMakeTask>("loom/array/make");
// Run
add_task_factory<RunTask>("run/run");
add_task_factory<RunTask>("loom/run/run");
}
......
......@@ -13,8 +13,9 @@ using namespace loom;
TaskManager::TaskManager(Server &server)
: server(server)
{
dslice_task_id = server.get_dictionary().find_or_create("scheduler/dslice");
slice_task_id = server.get_dictionary().find_or_create("base/slice");
auto &dictionary = server.get_dictionary();
dslice_task_id = dictionary.find_or_create("loom/scheduler/dslice");
slice_task_id = dictionary.find_or_create("loom/base/slice");
}
void TaskManager::add_plan(const loomplan::Plan &plan, bool distribute)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment