Skip to content

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