Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
Thrimbda committed Nov 17, 2023
1 parent d00b066 commit a9f6314
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/market-data-collector/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ interface IPullSourceRelation {
cron_timezone: string;
/** disable this relation (false equivalent to not set before) */
disabled?: boolean;
/** default to 0, means start from the latest period, above 0 means pull start from earlier periods */
replay_count?: number;
}

interface ITask extends IPullSourceRelation {
Expand Down Expand Up @@ -236,6 +238,7 @@ defer(() =>
period_in_sec: '' + task.period_in_sec,
},
options: {
skip: task.replay_count || 0,
sort: [['frozen_at', -1]],
limit: 1,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@yuants/app-general-data-source",
"comment": "init project",
"type": "patch"
}
],
"packageName": "@yuants/app-general-data-source"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@yuants/app-market-data-collector",
"comment": "add new option for replay periods",
"type": "patch"
}
],
"packageName": "@yuants/app-market-data-collector"
}

0 comments on commit a9f6314

Please sign in to comment.