Skip to content

Commit

Permalink
Use timestamps for default run names
Browse files Browse the repository at this point in the history
  • Loading branch information
ranlu committed May 15, 2022
1 parent 69bb197 commit 8f301a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion slackbot/slack_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import time
import logging
from secrets import token_hex
from datetime import datetime
import threading
import queue
import subprocess
Expand Down Expand Up @@ -403,7 +404,7 @@ def update_python_packages(msg):

def supply_default_param(json_obj):
if not json_obj.get("NAME", ""):
json_obj["NAME"] = token_hex(16)
json_obj["NAME"] = datetime.now().strftime("%Y%m%d%H%M%S")

if "SCRATCH_PREFIX" not in json_obj and "SCRATCH_PATH" not in json_obj:
json_obj["SCRATCH_PREFIX"] = "gs://ranl_pipeline_scratch/"
Expand Down

0 comments on commit 8f301a4

Please sign in to comment.