Add env vars to make jobs take longer for visual interest
This commit is contained in:
parent
d245581b7d
commit
d5ece9ac56
6 changed files with 12 additions and 0 deletions
|
|
@ -70,6 +70,8 @@ def handle_config(args):
|
||||||
print(json.dumps(config))
|
print(json.dumps(config))
|
||||||
|
|
||||||
def handle_exec(args):
|
def handle_exec(args):
|
||||||
|
import time, random, os; time.sleep(float(os.getenv('EXEC_SLEEP', '0')) * random.random())
|
||||||
|
|
||||||
if len(args) < 2:
|
if len(args) < 2:
|
||||||
print("Exec mode requires category and date arguments", file=sys.stderr)
|
print("Exec mode requires category and date arguments", file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,8 @@ def handle_config(args):
|
||||||
print(json.dumps(config))
|
print(json.dumps(config))
|
||||||
|
|
||||||
def handle_exec(args):
|
def handle_exec(args):
|
||||||
|
import time, random, os; time.sleep(float(os.getenv('EXEC_SLEEP', '0')) * random.random())
|
||||||
|
|
||||||
if len(args) < 2:
|
if len(args) < 2:
|
||||||
print("Exec mode requires category and date arguments", file=sys.stderr)
|
print("Exec mode requires category and date arguments", file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,8 @@ def handle_config(args):
|
||||||
print(json.dumps(config))
|
print(json.dumps(config))
|
||||||
|
|
||||||
def handle_exec(args):
|
def handle_exec(args):
|
||||||
|
import time, random, os; time.sleep(float(os.getenv('EXEC_SLEEP', '0')) * random.random())
|
||||||
|
|
||||||
# Write debug info to a file since stdout might not be captured
|
# Write debug info to a file since stdout might not be captured
|
||||||
debug_file = "/tmp/databuild_test/podcasts_debug.log"
|
debug_file = "/tmp/databuild_test/podcasts_debug.log"
|
||||||
with open(debug_file, "w") as f:
|
with open(debug_file, "w") as f:
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,8 @@ def handle_config(args):
|
||||||
print(json.dumps(config))
|
print(json.dumps(config))
|
||||||
|
|
||||||
def handle_exec(args):
|
def handle_exec(args):
|
||||||
|
import time, random, os; time.sleep(float(os.getenv('EXEC_SLEEP', '0')) * random.random())
|
||||||
|
|
||||||
if len(args) < 1:
|
if len(args) < 1:
|
||||||
print("Exec mode requires date argument", file=sys.stderr)
|
print("Exec mode requires date argument", file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,8 @@ def handle_config(args):
|
||||||
print(json.dumps(config))
|
print(json.dumps(config))
|
||||||
|
|
||||||
def handle_exec(args):
|
def handle_exec(args):
|
||||||
|
import time, random, os; time.sleep(float(os.getenv('EXEC_SLEEP', '0')) * random.random())
|
||||||
|
|
||||||
if len(args) < 2:
|
if len(args) < 2:
|
||||||
print("Exec mode requires category and date arguments", file=sys.stderr)
|
print("Exec mode requires category and date arguments", file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,8 @@ def handle_config(args):
|
||||||
print(json.dumps(config))
|
print(json.dumps(config))
|
||||||
|
|
||||||
def handle_exec(args):
|
def handle_exec(args):
|
||||||
|
import time, random, os; time.sleep(float(os.getenv('EXEC_SLEEP', '0')) * random.random())
|
||||||
|
|
||||||
if len(args) < 2:
|
if len(args) < 2:
|
||||||
print("Exec mode requires category and date arguments", file=sys.stderr)
|
print("Exec mode requires category and date arguments", file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue