stencila / hub

☸️ Hub for executable documents
https://hub.stenci.la
Apache License 2.0
31 stars 4 forks source link

Refactor existing "Pull" and "Convert" code to use Jobs #417

Closed alex-ketch closed 4 years ago

alex-ketch commented 4 years ago

Currently the Pull and Convert functions block the main thread and degrade the server performance. To fix this the functions should be converted to use the new Jobs mechanism.


How to provide feedback to user: Consideration needs to be taken around communicating conversion progress in the UI.

Option 1 Keep current UI, the conversion button spinner will periodically check for the completion status of the now asynchronous Convert Job

Option 2 UI is optimistically updated, showing the file to be outputted in the Files list:

This second option, while likely a better UX, it is more involved and would require changes to the Snapshotting and likely the Project file mounting behaviours. For the time being, we should go with the first option.

nokome commented 4 years ago

An update:

@richardmansfield could you next work on:

I'm going to work on integration in the director. My current ideas for that are to add some API endpoints, primarily for testing purposes:

alex-ketch commented 4 years ago

The foundational work necessary for this issue were done by @richardmansfield in the following PRs:

The second part of the original issue, using the Jobs mechanism from the Hub UI, remains to be done

nokome commented 4 years ago

Done