Skip to content

Commit e258713

Browse files
committed
fix: fix table name
Signed-off-by: frank-zsy <[email protected]>
1 parent a7b50ff commit e258713

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"data-docker": "docker pull docker-hub.x-lab.info/opendigger/github-sample-log:2.202105 && docker start github-sample-log || docker run -d --name github-sample-log -p 8123:8123 -p 9000:9000 --ulimit nofile=262144:262144 docker-hub.x-lab.info/opendigger/github-sample-log:2.202105",
1313
"notebook": "npm run build && docker pull docker-hub.x-lab.info/opendigger/open-digger-jupyter-nodejs:1.0 && docker run -it --rm -p 8888:8888 -v $(pwd):/home/node/notebook docker-hub.x-lab.info/opendigger/open-digger-jupyter-nodejs:1.0",
1414
"notebook:win": "npm run build && docker pull docker-hub.x-lab.info/opendigger/open-digger-jupyter-nodejs:1.0 && docker run -it --rm -p 8888:8888 -v %cd%:/home/node/notebook docker-hub.x-lab.info/opendigger/open-digger-jupyter-nodejs:1.0",
15-
"pull-label-file-test": "tsc && node lib/ci/pull_label_file_test.js",
16-
"cron": "npm run build && node --max-old-space-size=8192 lib/cron/index.js",
15+
"pull-label-file-test": "tsc && node lib/src/ci/pull_label_file_test.js",
16+
"cron": "npm run build && node --max-old-space-size=8192 lib/src/cron/index.js",
1717
"test": "CLICKHOUSE_HOST=http://106.15.39.211:8123 CLICKHOUSE_USERNAME=default CLICKHOUSE_PASSWORD= mocha"
1818
},
1919
"repository": {

src/cron/tasks/global_openrank.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const task: Task = {
6262
const lastMonthOpenrank = new Map<string, { info: any; openrank: number; }>();
6363
// const date = new Date(year, month - 1, 1);
6464
const lastMonth = new Date(year, month - 2, 1);
65-
const loadLastMonthSql = `SELECT actor_id, actor_login, repo_id, repo_name, org_id, org_login, platform, type, openrank FROM global_openrank WHERE toYYYYMM(created_at) = ${lastMonth.getFullYear()}${(lastMonth.getMonth() + 1).toString().padStart(2, '0')}`;
65+
const loadLastMonthSql = `SELECT actor_id, actor_login, repo_id, repo_name, org_id, org_login, platform, type, openrank FROM ${globalOpenrankTableName} WHERE toYYYYMM(created_at) = ${lastMonth.getFullYear()}${(lastMonth.getMonth() + 1).toString().padStart(2, '0')}`;
6666
const loadLastMonthResult = await clickhouse.query<string[]>(loadLastMonthSql);
6767
if (!Array.isArray(loadLastMonthResult)) {
6868
throw new Error(`Load last month openrank failed for ${yyyymm}, result=${loadLastMonthResult}`);

0 commit comments

Comments
 (0)