aboutsummaryrefslogtreecommitdiff
path: root/ips/task.py
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunk@stsci.edu>2013-04-22 11:17:44 -0400
committerJoseph Hunkeler <jhunk@stsci.edu>2013-04-22 11:19:34 -0400
commitf2288e48380a5557a49151fc95ee121baff65b56 (patch)
tree0592592bcb1f90ccc713c1c8ecf8d25ed93f1d15 /ips/task.py
parent2027d81c8662e616f5255a83242dc62cae1cc50a (diff)
downloadipsutils-f2288e48380a5557a49151fc95ee121baff65b56.tar.gz
Rename ips to ipsutils
Diffstat (limited to 'ips/task.py')
-rw-r--r--ips/task.py44
1 files changed, 0 insertions, 44 deletions
diff --git a/ips/task.py b/ips/task.py
deleted file mode 100644
index 1d8faeb..0000000
--- a/ips/task.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# This file is part of ipsutils.
-
-# ipsutils is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# ipsutils is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with ipsutils. If not, see <http://www.gnu.org/licenses/>.
-
-class TaskController(object):
- def __init__(self):
- self.stack = []
-
- def task(self, t):
- """
- t: Task object
- """
- self.stack.append(t)
-
- def do_tasks(self):
- """ FILO execution of tasks
- """
- for stack_entry in self.stack:
- stack_entry.run()
-
-class NamedTask(object):
- def __init__(self, name, func, *args):
- self.name = name
- self.task = func
- self.task_args = args
-
- def run(self):
- print("Running task: {0:s}".format(self.name))
- status = self.task(self.task_args)
- return status
-
-class InternalTask(NamedTask):
- pass