Skip to content
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

upstream Node-based cloud export service offline in export demo; switch to Ruby-based service for now #751

Open
jywarren opened this issue Sep 15, 2020 · 3 comments
Assignees
Labels

Comments

@jywarren
Copy link
Member

Following up on #716, @sashadev-sky noted the following demo wasn't working:

https://publiclab.github.io/Leaflet.DistortableImage/examples/export

@jywarren updated export.html but can't make it work.. also seeing it doesn't work in our gh-pages either so perhaps it never worked? The POST req to //34.74.118.242/api/v2/export/ times out in both scenarios. Going to say fixing that part is out of scope for this PR because i have no idea what is wrong! Just made sure here that we aren't using ajax anymore, etc.

Note I tested the startExport function updates on my own gh-pages page https://sasha.mapknitter.org/examples/select.html so I know its not any src code changes.

Where did this url come from ? //34.74.118.242/api/v2/export/

https://34.74.118.242/api/v2/export/ is our node-based export service. There is another in production on https://mapknitter.org as you can see here:

https://github.com/publiclab/mapknitter/blob/92e73e634550d6ec0e3f1e475d062fe967d54c9a/app/assets/javascripts/mapknitter/Map.js#L661-L676

It uses the Ruby-based cloud exporter at https://export.mapknitter.org, which is online. Let's use this until the Node-based service is back online.

Thanks!!!

@jywarren jywarren added the bug label Sep 15, 2020
@jywarren
Copy link
Member Author

I checked! Switching to https://export.mapknitter.org seems to work, although the way we handle the response is very different; in the export demo we currently:

window.location = statusUrl;

so we'll have to change that too.

@jywarren
Copy link
Member Author

In fact, it returns /id/1600207027/status.json, not an image location. We can look at the MapKnitter implementation to see how this can be parsed and repeatedly accessed until an image is ready, and then display it.

@jywarren
Copy link
Member Author

OK, using GitPod i was able to try this out and it works all right - we'd have to parse the response using code like this:

https://github.com/publiclab/mapknitter/blob/92e73e634550d6ec0e3f1e475d062fe967d54c9a/app/assets/javascripts/mapknitter/Map.js#L678-L717

@jywarren jywarren changed the title upstream Node-based cloud export service offline; switch to Ruby-based service for now upstream Node-based cloud export service offline in export demo; switch to Ruby-based service for now Sep 15, 2020
@sashadev-sky sashadev-sky self-assigned this Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants