Skip to content
This repository was archived by the owner on Jan 5, 2022. It is now read-only.

Commit 363c315

Browse files
authored
Update generic-worker.py
1 parent d2ffdb3 commit 363c315

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

worker/generic-worker.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,14 @@ def runSomething(message):
103103
logger = logging.getLogger(__name__)
104104

105105
# Parse your message somehow to pull out a name variable that's going to make sense to you when you want to look at the logs later
106+
# What's commented out below will work, otherwise, create your own
107+
#group_to_run = message["group"]
108+
#groupkeys = list(group_to_run.keys())
109+
#groupkeys.sort()
110+
#metadataID = '-'.join(groupkeys)
106111

107112
# Add a handler with
108-
# watchtowerlogger=watchtower.CloudWatchLogHandler(log_group=LOG_GROUP_NAME, stream_name=str(YourVariable),create_log_group=False)
113+
# watchtowerlogger=watchtower.CloudWatchLogHandler(log_group=LOG_GROUP_NAME, stream_name=str(metadataID),create_log_group=False)
109114
# logger.addHandler(watchtowerlogger)
110115

111116
# See if this is a message you've already handled, if you've so chosen

0 commit comments

Comments
 (0)