Skip to content

Commit b8e0ae0

Browse files
committed
v not needed
Signed-off-by: Diogenes Fernandes <[email protected]>
1 parent 4252f20 commit b8e0ae0

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

search/worker/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "registry-ui-search",
3-
"version": "0.0.1",
3+
"version": "0.0.0",
44
"private": true,
55
"scripts": {
66
"deploy": "wrangler deploy",

search/worker/scripts/feed-data-r2.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ const readdir = promisify(fs.readdir);
1010
// This script is used to retrieve data generated by `go run generate.go` at backend folder.
1111
// It will generate registry data that will be used by this script to feed into wrangler dev folder, mimicking a R2 bucket.
1212
// This script expects data will be at /tmp/registry.
13-
14-
const BATCH_SIZE = 2
1513
const DIR_PATH = '/tmp/registry';
1614

1715
const putObject = (directoryPath) => async (filename, i) => {
@@ -20,7 +18,7 @@ const putObject = (directoryPath) => async (filename, i) => {
2018

2119
try {
2220
const stats = await stat(realFilePath)
23-
// directories are not supported by wrangler api and
21+
// Directories are not supported by `wrangler r2` API and
2422
// not needed since wrangler create the path without using folders.
2523
if(stats.isDirectory()) return
2624
} catch(err) {
@@ -47,9 +45,8 @@ const run = async () => {
4745
console.log(`Reading ${DIR_PATH}...`)
4846
const files = await readdir(DIR_PATH, { recursive: true });
4947
const total = files.length;
50-
const batches = Math.ceil(total / BATCH_SIZE);
5148

52-
console.log(`Processing about ${total} files/folders in ${batches} batches...`);
49+
console.log(`Processing about ${total} files/folders...`);
5350
// We're processing sequentially because wranger r2 put doesn't handle
5451
// well concurrency giving a lot of errors, even with 2 files at once.
5552
for(const f of files) {

0 commit comments

Comments
 (0)