luigi.contrib.simulate module

A module containing classes used to simulate certain behaviors

class luigi.contrib.simulate.RunAnywayTarget(task_obj)[source]

Bases: Target

A target used to make a task run every time it is called.


Pass self as the first argument in your task’s output:

And then mark it as done in your task’s run:

temp_dir = '/tmp/luigi-simulate'
temp_time = 86400
unique = <Synchronized wrapper for c_int(0)>

Returns a temporary file path based on a MD5 hash generated with the task’s name and its arguments


Checks if the file exists


Creates temporary file to mark the task as done