-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
stop reset job endpoint from blocking #2246
Conversation
@@ -26,6 +26,7 @@ | |||
|
|||
import pendulum as pendulum | |||
from base_python import BaseClient | |||
|
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.
??? i ran format. promise.
@@ -195,8 +201,9 @@ public ConnectionRead webBackendUpdateConnection(WebBackendConnectionUpdate webB | |||
|
|||
// wait for this to execute | |||
JobInfoRead resetJob = schedulerHandler.resetConnection(connectionId); | |||
final JobInfoRead completedResetJob = waitForJobToComplete(resetJob.getJob().getId()); |
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.
this endpoint (updating a connection, still needs to block and until the reset job is complete, so we have to add that logic here)
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.
Why is that?
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.
i guess we could just not. if the reset fails then the destination will have a combination of data from different schemas.
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.
I saw weird behavior when using resets, thanks for fixing.
|
||
public class WebBackendConnectionsHandler { | ||
|
||
private static final Set<JobStatus> TERMINAL_STATUSES = Sets.newHashSet(JobStatus.FAILED, JobStatus.SUCCEEDED, JobStatus.CANCELLED); |
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.
I can see this set becoming handy outside of the webbackend. Is there a more approriate place where it could belong?
@@ -195,8 +201,9 @@ public ConnectionRead webBackendUpdateConnection(WebBackendConnectionUpdate webB | |||
|
|||
// wait for this to execute | |||
JobInfoRead resetJob = schedulerHandler.resetConnection(connectionId); | |||
final JobInfoRead completedResetJob = waitForJobToComplete(resetJob.getJob().getId()); |
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.
Why is that?
e4c792c
to
83f4b41
Compare
What