Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use configured baseUrl and eventKey for sending events #33

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion inngest-core/src/main/kotlin/com/inngest/Environment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ object Environment {

fun inngestEventKey(key: String? = null): String {
if (key != null) return key
return System.getenv(InngestSystem.EventKey.value) ?: ""
return System.getenv(InngestSystem.EventKey.value) ?: "NO_EVENT_KEY_SET"
}

fun inngestSigningKey(
Expand Down
3 changes: 1 addition & 2 deletions inngest-core/src/main/kotlin/com/inngest/Inngest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class Inngest
}

internal inline fun <reified T> sendEvent(payload: Any): T? {
val eventKey = "test"
return send("http://localhost:8288/e/$eventKey", payload)
return send("$baseUrl/e/$eventKey", payload)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal class EnvironmentTest {
// EventKey
@Test
fun `test inngestEventKey`() {
assertEquals("", Environment.inngestEventKey())
assertEquals("NO_EVENT_KEY_SET", Environment.inngestEventKey())
}

@Test
Expand Down
Loading