4.1 Tasks

4.1.1 Task

class baelfire.task.Task(core=None)

Normal task.

build_if(dependency)

Add dependency to a task.

name

Return name of this task.

run()

Check all dependencies and rebuild if needed.

run_before(task)

Run task before self.

save_report()

Save report file after task run.

touch(file_name=None, file_path=None, times=None)

Update mtime of a file.

  • file_name - name of the file in Core.paths
  • file_path - path to a file
  • times - set the access and modified times of the file specified by path (see os.utime documentation)

4.1.2 TemplateTask

class baelfire.task.template.TemplateTask(core=None)

Task which generate file from template.

4.1.3 FileTask

class baelfire.task.file.FileTask(core=None)

Task which operates on files.

Need to implement FileTask.output_name parameter.

4.1.4 SubprocessTask

class baelfire.task.process.SubprocessTask(core=None)

Task which will run external programs. This task will manage sending proccess signals.

popen(*args, **kwargs)

Run subprocess.Popen whitin the task.

4.1.5 ScreenTask

class baelfire.task.screen.ScreenTask(core=None)

Start command in detached screen. In order to use ScreenTask, your application’s core needs to inherit from ScreenCore.

4.1.6 AttachScreenTask

class baelfire.task.screen.AttachScreenTask(core=None)

Attach task from screen. Run it first if needed.

In order to use AttachScreenTask, your application’s core needs to inherit from ScreenCore and you need to set detached_task property, which should be the ScreenTask like task.

4.1.7 ScreenCore

class baelfire.task.screen.ScreenCore

Core with ‘exe:screen’ setting, which gives path to the screen application.