-
Notifications
You must be signed in to change notification settings - Fork 38
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
Automatic refresh for workflow instance page in Explorer #270
Conversation
|
||
function reloadWorkflow(workflowId) { | ||
console.log('Fetching workflow id ' + workflowId); | ||
WorkflowService.get(workflowId).then(function(workflow) { |
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.
If there is already a pending fetch - should we cancel it or skip this fetch? This is for example when the network is down/slow.
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.
Good point, though the previous pollers (executors, workflow definition) don't do this either. Maybe we should add a task for fixing all the pollers?
} | ||
self.poller = $interval(function() { reloadWorkflow(self.workflow.id); }, | ||
config.radiator.pollPeriod * 1000); | ||
$scope.$on('$destroy', function() { |
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.
should we stop the poller if the workflow is in final state?
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.
No, because someone can move it manually to some non-final state? If someone wants to monitor finished workflow, I think we can grant him 1 rest api call every 15 seconds without overloading the servers :)
radiator.pollPeriod