Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Cancel initialize job when removing workspace #60

Closed
wants to merge 5 commits into from

Conversation

Poytr1
Copy link
Contributor

@Poytr1 Poytr1 commented Jun 8, 2019

Resolve: https://github.com/elastic/code/issues/1187

When creating the initialize job, I set the root uri as a part of the job's name. Then when the didChangeWorkspaceFolders is called, It will check all initialization job to see if any job's name matches the removed workspace's uri and cancel it.
The problem is that we still need cancel the update workspace job, which means I still rewrite another handler, adding more duplicated code.
The best solution is patching these logic to upstream, but not sure if they will accept it.

  • Using belongsTo instead of adding uri to job's name
  • Add tests
  • Support update workspace jobs

@Poytr1 Poytr1 requested a review from zfy0701 June 8, 2019 11:12
@Poytr1
Copy link
Contributor Author

Poytr1 commented Jun 8, 2019

@zfy0701 How do you think about this?

@Poytr1 Poytr1 force-pushed the pcxu_cancel_init branch from 8c73495 to c5d520f Compare June 9, 2019 11:06
@Poytr1 Poytr1 force-pushed the pcxu_cancel_init branch from 099640f to d386ef8 Compare June 10, 2019 06:32
@Poytr1 Poytr1 force-pushed the pcxu_cancel_init branch from 1e091d2 to ef73e15 Compare June 10, 2019 06:39
@Poytr1 Poytr1 requested a review from movie-travel-code June 10, 2019 06:57
Copy link

@movie-travel-code movie-travel-code left a comment

Choose a reason for hiding this comment

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

LGTM.

return null;
}

}

Choose a reason for hiding this comment

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

Please leave a new line at the end of the file. It's optional.

@Poytr1
Copy link
Contributor Author

Poytr1 commented Jun 19, 2019

Upstream PR eclipse-jdtls/eclipse.jdt.ls#1064 was merged.

@Poytr1 Poytr1 closed this Jun 19, 2019
@Poytr1 Poytr1 deleted the pcxu_cancel_init branch June 20, 2019 12:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants