-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Refactor scylla model; 2. support gracefuldown
- Loading branch information
Showing
19 changed files
with
974 additions
and
1,311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
src/**/*.test.ts | ||
node_modules | ||
coverage | ||
dist | ||
debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* eslint-env node */ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true | ||
}, | ||
extends: [ | ||
"plugin:@typescript-eslint/recommended-type-checked", | ||
"plugin:@typescript-eslint/stylistic-type-checked" | ||
], | ||
plugins: ["@typescript-eslint"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: ["./tsconfig.eslint.json"], | ||
ecmaVersion: "latest", | ||
sourceType: "module" | ||
}, | ||
rules: { | ||
// Note: you must disable the base rule as it can report incorrect errors | ||
"space-before-function-paren": "off", | ||
"@typescript-eslint/space-before-function-paren": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-return": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"@typescript-eslint/no-unsafe-argument": "off", | ||
}, | ||
root: true, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"port": 8080, | ||
"gracefulShutdown": 5, | ||
"proxyUrls": [], | ||
"scylladb": { | ||
"username": "", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,17 @@ | ||
-- hid BLOB, # SHA1(unique Url) | ||
-- at BIGINT, # create at, a timestamp (date and time) with second precision. | ||
-- url TEXT, # unique Url, generated by crawlee | ||
-- src TEXT, # source Url | ||
-- title TEXT, # document title | ||
-- meta MAP<text, text>, # document meta info. e.g. author, keywords, description, etc. | ||
-- cbor BLOB, # document content in CBOR format | ||
-- html TEXT, # document content in html format | ||
-- page TEXT, # full page content in html format | ||
CREATE TABLE IF NOT EXISTS doc ( | ||
hid BLOB, | ||
at BIGINT, | ||
url TEXT, | ||
src TEXT, | ||
title TEXT, | ||
meta MAP<text, text>, | ||
cbor BLOB, | ||
html TEXT, | ||
page TEXT, | ||
PRIMARY KEY (hid, at) | ||
) WITH CLUSTERING ORDER BY (at DESC) | ||
AND caching = {'enabled': 'true'} | ||
id BLOB, -- document id, 12 bytes XID, https://github.com/yiwen-ai/xid-ts | ||
url TEXT, -- unique Url, generated by crawlee | ||
src TEXT, -- source Url | ||
title TEXT, -- document title | ||
meta MAP<text, text>, -- document meta info. e.g. author, keywords, description, etc. | ||
content BLOB, -- document content in CBOR format | ||
html TEXT, -- document content in html format | ||
page TEXT, -- full page content in html format | ||
PRIMARY KEY (id) | ||
) WITH caching = {'enabled': 'true'} | ||
AND comment = 'scraped documents from web' | ||
AND compaction = {'class': 'SizeTieredCompactionStrategy'} | ||
AND compression = {'sstable_compression': 'LZ4Compressor'} | ||
AND default_time_to_live = 0; | ||
|
||
CREATE INDEX doc_url ON doc (url); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.