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

Publish metadata #812

Merged
merged 5 commits into from Jun 27, 2017
Merged

Publish metadata #812

merged 5 commits into from Jun 27, 2017

Conversation

okdistribute
Copy link
Collaborator

@okdistribute okdistribute commented Jun 20, 2017

This along with https://github.com/datproject/datproject.org/pull/594 will fix #803. That means when you dat publish, the registry will automatically pick up your metadata and have it ready for display so that even if the dat is down, we have a first picture of what the dat is. That also makes sure that the url is legit before allowing the publish to happen.

It also bumps dat-registry to 3.0.3 for a tiny bug fix.

@joehand
Copy link
Collaborator

joehand commented Jun 20, 2017

Sweet! Does publish on the registry wait to return 200 until the dat metadata is downloaded? Couldn't quite see in the code.

@okdistribute
Copy link
Collaborator Author

okdistribute commented Jun 20, 2017

It gives it 5 seconds, and then if it doesn't get any entries it returns an error with message 'timed out'. https://github.com/datproject/dat-registry-api/blob/c9a01211fd50b456ab269a066ffdc7d017a9fd4f/api/dats.js#L44

@okdistribute
Copy link
Collaborator Author

@joehand just committed a little bit on an error message, what do you think?
screen shot 2017-06-19 at 10 54 04 pm

@joehand joehand added this to the 13.7 milestone Jun 20, 2017
@joehand
Copy link
Collaborator

joehand commented Jun 20, 2017

Looks good and ready to merge but I want to see what @Karissa says about uploading the full dat.json bug:

ERROR: insert into "dats" ("author", "description", "id", "name", "title", "url", "user_id") values ('Joe Hand', 'space for jhand to write and play', 'aa0d2f3d-00e2-4260-b054-7abbc86adcf8', 'jhand-space', 'jhand space', 'dat://ad7e5e6562e920af0ae78d20e1a6a2b599c658df46a9b73ef7951180fcd0e56d', '9d0afbf0-e0e4-41b0-b398-ba86bf419383') - SQLITE_ERROR: table dats has no column named author

@joehand joehand merged commit 247cb77 into master Jun 27, 2017
@joehand joehand deleted the publish-metadata branch June 27, 2017 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publish should upload the dat metadata to the registry
2 participants