Skip to content

Commit

Permalink
Merge pull request #80 from diggyk/master
Browse files Browse the repository at this point in the history
Updated verbiage on Hermes notify
  • Loading branch information
jathanism committed Oct 19, 2015
2 parents e42a7c0 + dbd7b2f commit 398717d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
21 changes: 14 additions & 7 deletions bin/hermes-notify
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,16 @@ def main():
# generate and send emails
for owner in info:
msg = (
"Hello {}:\n\nYou have open Hermes labors "
"which need to be addressed ASAP.\n".format(owner)
"Hello {}:\n\nYou have open Hermes labors. Due dates, if any, "
"are noted with each quest.".format(owner)
)

msg += (
"\nTo see more information or throw event "
"manually, please visit {}/v1/labors\n\n".format(settings.frontend)
"\nTo throw an event manually, you can run the following command "
"on a shell server:"
"\n\n"
"$ hermes event create [event] --host [hostname].\n\n"
"Or you can visit {}/v1/labors\n\n".format(settings.frontend)
)

for quest_id in info[owner]:
Expand All @@ -131,16 +134,20 @@ def main():
msg += "QUEST {} [created by {}]:\n".format(
quest_id, quest.creator
)
msg += " \"{}\"\n".format(textwrap.fill(
if quest.target_time:
msg += "Due: {}\n".format(quest.target_time)
msg += "Description: \"{}\"\n".format(textwrap.fill(
quest.description,
width=60, subsequent_indent=" "
width=60, subsequent_indent=""
))
msg += " href: {}/v1/quests/{}\n\n".format(
msg += "Href: {}/v1/quests/{}\n\n".format(
settings.frontend, quest_id
)
else:
msg += " Labors not associated with a quest:\n\n"

msg += "Machines with labors:\n"

for hostname in sorted(info[owner][quest_id]):
msg += " {} ({})\n".format(
hostname, (", ".join(tags[hostname]))
Expand Down
2 changes: 1 addition & 1 deletion hermes/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.23"
__version__ = "0.4.25"

0 comments on commit 398717d

Please sign in to comment.