-
Notifications
You must be signed in to change notification settings - Fork 18
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
fix: tracking job offer update events #194
Conversation
@@ -16,8 +16,9 @@ const nodeInfoEndpoint = "nodes" | |||
const nodeConnectionEndpoint = "uptimes" | |||
const dealsEndpoint = "deals" | |||
|
|||
var host = os.Getenv("API_HOST") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@walkah I moved this out of the function call, I don't think we need to call it every time the function executes right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're absolutely right! Good catch 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 lgtm!
@@ -16,8 +16,9 @@ const nodeInfoEndpoint = "nodes" | |||
const nodeConnectionEndpoint = "uptimes" | |||
const dealsEndpoint = "deals" | |||
|
|||
var host = os.Getenv("API_HOST") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're absolutely right! Good catch 👍
Review Type Requested (choose one):
Summary
These changes make it so that tracking the job offer update is not a subscription to job offer updates but a method call right before the subscriptions are executed.
Details (optional)
Why?
I wish I knew why the previous way was not working, locally it worked, so the assumption was that it would also work in the deployed infra.
I have a hypothesis the previous subscription was part of the client code and because the client should not have access to the
API_HOST
env var the requests should not have been going out, but as it happens, the doppler settings forrun
did include theAPI_HOST
- although, after removing it, locally the events would be still tracked 🤷 .How to test this code? (optional)
jobs
table in the db has the corresponding job entry (in the api repo:./stack psql
, thenSELECT * FROM jobs;
)