From 74d4e7d50585db230cfe07464a1a4b662c04b409 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 28 Dec 2008 10:12:41 +0000 Subject: First round of a task framework. Tasks are job definitions stored in the database. They're started with admin/maintenance/start/[task_name] which sends down some JS/HTML which regularly pings the task at admin/maintenance/start/[task_id] until its done. The UI is still very rough. It works, though! --- core/models/task.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 core/models/task.php (limited to 'core/models/task.php') diff --git a/core/models/task.php b/core/models/task.php new file mode 100644 index 00000000..697ab7bc --- /dev/null +++ b/core/models/task.php @@ -0,0 +1,36 @@ +context); + if (array_key_exists($key, $context)) { + return $context[$key]; + } else { + return $default; + } + } + + public function set($key, $value) { + $context = unserialize($this->context); + $context[$key] = $value; + $this->context = serialize($context); + } +} \ No newline at end of file -- cgit v1.2.3