Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ianj-als/pcl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Johnson <ianj@wgrids.com>2013-10-29 17:33:08 +0400
committerIan Johnson <ianj@wgrids.com>2013-10-29 17:33:08 +0400
commit508d01633959a87b50257af4b69989cdbfd3f4c9 (patch)
tree430f1ab4f356baff413c2665b5b43e5ced26b253
parent7c3aed5bc44f8594d52d319e4d9b6ead0eac08cb (diff)
Removed sleep.py from examples. Will be replaced with a PCL file.
-rw-r--r--examples/parallel_sleep/sleep.cfg5
-rw-r--r--examples/parallel_sleep/sleep.py43
2 files changed, 5 insertions, 43 deletions
diff --git a/examples/parallel_sleep/sleep.cfg b/examples/parallel_sleep/sleep.cfg
new file mode 100644
index 0000000..b5b4ab6
--- /dev/null
+++ b/examples/parallel_sleep/sleep.cfg
@@ -0,0 +1,5 @@
+[Configuration]
+sleep_command = /bin/sleep
+
+[Inputs]
+sleep_time = 5
diff --git a/examples/parallel_sleep/sleep.py b/examples/parallel_sleep/sleep.py
deleted file mode 100644
index e6ae72c..0000000
--- a/examples/parallel_sleep/sleep.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# Copyright Capita Translation and Interpreting 2013
-#
-# This file is part of Pipeline Creation Language (PCL).
-#
-# Pipeline Creation Language (PCL) 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.
-#
-# Pipeline Creation Language (PCL) 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 Pipeline Creation Language (PCL). If not, see <http://www.gnu.org/licenses/>.
-#
-import subprocess
-
-def get_name():
- return "sleep"
-
-def get_inputs():
- return ['sleep_time']
-
-def get_outputs():
- return ['complete']
-
-def get_configuration():
- return ['sleep_command']
-
-def configure(args):
- return {'sleep_command' : args['sleep_command']}
-
-def initialise(config):
- def sleep_function(a, s):
- proc = subprocess.Popen([config['sleep_command'], str(a['sleep_time'])])
- proc.communicate()
- return {'complete' : True}
-
- return sleep_function
-