Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix: improve unresolved task deletion job #594

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
Loading
from

Conversation

kamko
Copy link

@kamko kamko commented Jan 4, 2025

Brief, plain english overview of your changes here

Calculates age of unresolved execution based on it's execution time instead of first scheduler run.
More in issue: #515 (comment)

Fixes

#515

Reminders

  • Added/ran automated tests
  • Update README and/or examples
  • Ran mvn spotless:apply - also added .gitattributes because spotless went mad with CRLF on Windows

cc @kagkarlsson

@kamko kamko changed the title #515: improve unresolved task deletion job feat: improve unresolved task deletion job Jan 19, 2025
@kamko kamko changed the title feat: improve unresolved task deletion job fix: improve unresolved task deletion job Jan 19, 2025
@kamko
Copy link
Author

kamko commented Jan 19, 2025

Seems weird that the build failed on

 Error:  Errors: 
Error:    MssqlClusterTest.test_concurrency_optimistic_locking:68->lambda$test_concurrency_optimistic_locking$1:72 » TaskInstance Failed to add new execution. (task name: Custom, instance id: 2107)

@kagkarlsson
Copy link
Owner

Yeah, probably a test-issue

@kamko
Copy link
Author

kamko commented Mar 13, 2025

Anything I can do with this?

Comment on lines +362 to +369
schedulerTaskRepository.getScheduledExecutions(
ScheduledExecutionsFilter.all(),
execution ->
taskToNewestExecutionTime.merge(
execution.taskInstance.getTaskName(),
execution.executionTime,
(oldValue, newValue) -> oldValue.isAfter(newValue) ? oldValue : newValue));

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather avoid this...

Is there perhaps a way to have the TaskResolver also get information on how long the task-name has been unresolved 🤔 (and use that, rather than fetching all executions into mem and checking)

Copy link
Owner

@kagkarlsson kagkarlsson Apr 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I.e. do something here

For example, sending in the execution-time for the execution that is unresolved

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.