Skip to content
This repository was archived by the owner on Jan 28, 2020. It is now read-only.

Conversation

noisecapella
Copy link
Contributor

Fixes #111

@noisecapella noisecapella force-pushed the feature/gs/import_status branch 7 times, most recently from 6422e7b to ae4b395 Compare October 29, 2015 21:46
@pdpinch pdpinch added ready and removed in progress labels Nov 2, 2015
@noisecapella noisecapella force-pushed the feature/gs/import_status branch 6 times, most recently from de8090e to 2c9c0f9 Compare November 5, 2015 22:14
Copy link
Contributor

Choose a reason for hiding this comment

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

what if some call fails?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The code above attaches handlers for the success case of deferred but doesn't actually resolve or reject the initial promise until this line. We need to resolve the initial promise so that it can start evaluating the other success callbacks. To illustrate:

deferred -> task1 -> task2 -> task3

deferred is always resolved. It doesn't do anything but we need to attach the task chain to something we have control of. Then task1 is evaluted. It returns a promise that's either rejected or resolved depending on how the AJAX request went. If task1 succeeded task2's success handler is then executed.

If task1 failed it would try to execute task2's failure handler, or task3, or whatever the next in line with a failure handler is. None of them have failure handlers so we just stop executing the chain in the event of a AJAX failure.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, got it

@giocalitri
Copy link
Contributor

The UI does not look great:
screen shot 2015-11-12 at 11 53 12 am

@pdpinch ?

@giocalitri
Copy link
Contributor

There is no way to dismiss the message:
screen shot 2015-11-12 at 12 03 40 pm

@giocalitri
Copy link
Contributor

Only two comments about the UI and one minor in the code.

@pdpinch
Copy link
Member

pdpinch commented Mar 14, 2016

Hi George. How close is this to being done? All things being equal I'd like to include it in the next release, but it's not critical if it's still need a lot of work.

@noisecapella
Copy link
Contributor Author

@giocalitri uncovered an edge case where the imports in progress wouldn't disappear properly if the Celery server had stopped the worker. He also wanted changes to the UI as mentioned above. I don't think there's a lot of work left but it's not quite there yet

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants