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

fix: only send sensor start event on first poke #700

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

Mryashbhardwaj
Copy link
Member

@Mryashbhardwaj Mryashbhardwaj commented Jan 4, 2023

Is your feature request related to a problem? Please describe.
The existing sensor metric "sensor_start_event" call back gets invoked on every sensor poke.
This results in redundant database calls on optimus server. To overcome this we need to have some sort of stateful storage that can limit the "sensor_start_event" to only once per sensor attempt.

Describe the solution you'd like
It's ideal to use the XCOMs as a state storage for maintaining the record of events pushed per sensor attempt.
Before pushing the event to optimus the scheduler can check if a start event has already been sent

Describe alternatives you've considered

  1. Reading the state of job run from the optimus server itself
  2. keeping a cache at optimus

@coveralls
Copy link

Pull Request Test Coverage Report for Build 3836134017

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 91.609%

Totals Coverage Status
Change from base Build 3828391416: 0.02%
Covered Lines: 8275
Relevant Lines: 9033

💛 - Coveralls

@Mryashbhardwaj Mryashbhardwaj merged commit f5a5e8c into main Jan 6, 2023
@Mryashbhardwaj Mryashbhardwaj deleted the feature/stateful_sensors_via_xcom branch January 6, 2023 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants