-
Notifications
You must be signed in to change notification settings - Fork 167
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
Use 🛻 pickup to handle pinning service requests #2309
Comments
Either nft.storage/packages/api/src/config.js Lines 39 to 49 in 69a49ce
nft.storage/packages/api/src/config.js Lines 16 to 20 in 69a49ce
|
the cloudflare dashboard shows that only |
The nft.storage/packages/api/src/utils/router.js Lines 185 to 191 in 69a49ce
I believe this is only relevant for testing, where multiple services are running on the same host. |
nft.storage/packages/api/src/routes/pins-add.js Lines 53 to 54 in 69a49ce
therefore the service will be defaulted to nft.storage/packages/api/src/utils/db-client.js Lines 289 to 301 in 69a49ce
and https://github.com/nftstorage/nft.storage/blob/main/packages/api/src/routes/pins-replace.js#L75-L76 |
nft.storage/packages/api/src/utils/db-transforms.js Lines 48 to 60 in 69a49ce
but this is currently stubbed out, so is not an issue. nft.storage/packages/api/src/cluster.js Lines 101 to 103 in 69a49ce
|
Need to check ElasticIpfs pin statuses in cron job
|
Update cron pins bin to pass in nft.storage/packages/cron/src/bin/pins.js Lines 18 to 22 in 69a49ce
...and query that from the job nft.storage/packages/cron/src/jobs/pins.js Lines 183 to 185 in 69a49ce
|
pickup pulls dags into E-IPFS, so this PR updates the api and cron jobs to reflect that in our db. - Update the pinning service add and update api routes to record `ElasticIpfs` as the service that the pin is queued on. - Update pins and pins-failed cron jobs to check pin status in pickup instead of cluster Fixes #2309 TODO - [ ] add `PICKUP_BASIC_AUTH_TOKEN` as a secret to the repo for cron jobs. - [ ] update `CLUSTER-*` api env vars. License: MIT Signed-off-by: Oli Evans <[email protected]>
pickup pulls dags into E-IPFS, so this PR updates the api and cron jobs to reflect that in our db. - Update pins and pins-failed cron jobs to check pin status in pickup instead of cluster Fixes #2309 TODO - [x] add `PICKUP_BASIC_AUTH_TOKEN` as a secret to the repo for cron jobs. - [ ] update `CLUSTER-*` api env vars. License: MIT Signed-off-by: Oli Evans <[email protected]>
pickup pulls dags into E-IPFS, so this PR updates the api to reflect that. - Update the pinning service add and update api routes to record `ElasticIpfs` as the service that the pin is queued on. - Update `GET /pins/:req-id` to check for a status change from pickup and update out DB, so we can inform users early when a pin request is pinned or failed. Cron changes are in #2339 Fixes #2309 License: MIT Signed-off-by: Oli Evans <[email protected]>
Review the api env, db schema, and cron jobs to find out what needs to be updated to have the api use pickup to handle pinning service requests.
TODO
api/src/routes/pins-add.js
to specify ElasticIpfs as the service when calling createUploadapi/src/routes/pins-replace.js
to specify ElasticIpfs as the service when calling createUploadcron/src/bin/pins.js
to add a cluster client configured to hitpickup
.cron/src/jobs/pins.js
to addElasticIpfs
to the list of Clusters to checkcron/src/bin/pins.js
to add a check pin statuses on pickup for via status.allstaging
worker env var forCLUSTER_API_URL
set to staging pickup urlstaging
worker env var forCLUSTER_SERVICE
prod
worker env var forCLUSTER_API_URL
set to prod pickup urlprod
worker env var forCLUSTER_SERVICE
note: the env var
CLUSTER_SERVICE
takes precedence overCLUSTER_API_URL
, so we can add a value forCLUSTER_API_URL
whenever we like, and then delete theCLUSTER_SERVICE
env var when we are ready for to make the switch.Parent: web3-storage/pickup#68
The text was updated successfully, but these errors were encountered: