Skip to content

Conversation

@okerekechinweotito
Copy link
Contributor

Fixes: T355989

Mapping for the labels/properties used in the uploadToWikiData function can be found on- https://prop-explorer.toolforge.org/

Proposed Changes

  • If Upload to Commons is successful, a corresponding page should also be created on WikiData
  • The WikiData Link should be shown together with the Commons Link in the queue modal

Files Created/Updated

  • utils/helper.js - add uploadToWikiData function and logic
  • bull/commons-queue/consumer.js - call uploadToWikiData function if upload to Commons is successful
  • bull/google-books-queue/consumer.js - send WikiData return value to server.js
  • bull/trove-queue/consumer.js - send WikiData return value to server.js
  • components/ShowJobInformation - display WikiData link on queue modal
  • server.js - receive WikiData return value and send to client

Images

Screenshot (118)

@coderwassananmol
Copy link
Owner

@okerekechinweotito I tested this PR with a couple of books from Google Books.
With this book, it failed to upload to Commons and Wikidata with the following error returning on server console:

error - unhandledRejection: TypeError: Cannot read properties of undefined (reading 'filename')
at /Users/anmol/BUB2/bull/google-books-queue/consumer.js:129:66
at process. (/Users/anmol/BUB2/bull/commons-queue/producer.js:19:5)
at process.emit (node:events:527:28)
at Queue. (/Users/anmol/BUB2/bull/commons-queue/consumer.js:81:13)

I observed one more error with this book where it failed with this error on the Queue Status page: Failed! (Reason: Cannot read properties of undefined (reading 'trim'))

@coderwassananmol coderwassananmol merged commit cb67124 into coderwassananmol:develop Jun 8, 2024
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.

2 participants