sample_tasks.py 465 B

12345678910111213141516171819202122232425
  1. import logging
  2. from .tasks import gen_task
  3. from .simple_pwatcher_bridge import (
  4. PypeLocalFile, makePypeLocalFile, fn,
  5. PypeTask, #Dist,
  6. )
  7. LOG = logging.getLogger(__name__)
  8. def create_task(i1, o1):
  9. script = """
  10. cat {input.i1} > {output.o1}
  11. """
  12. return gen_task(
  13. script=script,
  14. inputs={
  15. 'i1': i1,
  16. },
  17. outputs={
  18. 'o1': o1,
  19. },
  20. parameters={},
  21. )