gsksivesh / dagobah

Simple DAG-based job scheduler in Python
Do What The F*ck You Want To Public License
2 stars 1 forks source link

Dagobah context variables #32

Open gsksivesh opened 5 years ago

gsksivesh commented 5 years ago

Issue by rclough Friday Aug 08, 2014 at 22:13 GMT Originally opened as https://github.com/thieman/dagobah/issues/111


Have dagobah allow tasks to use some variables specific to dagobah such as:

  1. Unique run ID for a job
  2. Time start

Not sure if theres anything else but just an idea. Could be manually added to the map generated from os.environ (see the patch I just submitted) so tasks can just access like $DAGOBAH_JOB_ID or $DAGOBAH_TIME_START for example.

Pitfalls: Cannot pass environment variables to remote machines. Could be implemented as string replacements on the task, but then we have to worry about escaping keywords if needed. (I guess that wouldnt be that bad if you use something like $dagobah_run_id)

gsksivesh commented 5 years ago

Comment by thieman Saturday Aug 09, 2014 at 02:19 GMT


Seems reasonable. A lot of tools like Jenkins do something similar.