Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

Commit

Permalink
Add application message (#6)
Browse files Browse the repository at this point in the history
* add expired message to application
  • Loading branch information
malmas18 authored Mar 6, 2019
1 parent 54ad1ac commit ea751da
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/subscribers/slack/bin/Debug/netcoreapp2.2/slack.dll",
"program": "${workspaceFolder}/subscribers/slack/worker/bin/Debug/netcoreapp2.2/slack.worker.dll",
"args": [],
"cwd": "${workspaceFolder}/subscribers/slack",
"cwd": "${workspaceFolder}/subscribers/slack/worker",
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart",
"env": {
"AWS_SQS_QUEUE_URL": "http://localhost:4576/queue/dta-marketplace-local-slack",
"AWS_SQS_SERVICE_URL": "http://localhost:4576"
"AWS_SQS_SERVICE_URL": "http://localhost:4576",
"WORK_INTERVAL_IN_SECONDS": "5",
"AWS_SQS_LONG_POLL_TIME_IN_SECONDS": "1"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"type": "process",
"args": [
"build",
"${workspaceFolder}/subscribers/slack/slack.csproj"
"${workspaceFolder}/subscribers/slack/worker/worker.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public async override Task<bool> Process(AwsSnsMessage awsSnsMessage) {
var definition = new {
name = "",
email_address = "",
from_expired = default(bool?),
application = new {
id = -1,
name = "",
Expand All @@ -35,6 +36,9 @@ public async override Task<bool> Process(AwsSnsMessage awsSnsMessage) {
subject = "An existing seller has started a new application";
} else if (message.application.type == "new") {
subject = "A new seller has started an application";
if (message.from_expired.GetValueOrDefault(false)) {
subject += " (from expired)";
}
}
if (string.IsNullOrEmpty(subject) == false) {
var slackMessage =
Expand Down

0 comments on commit ea751da

Please sign in to comment.