Skip to content
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

force-clean #619

Merged
merged 5 commits into from
Nov 11, 2021
Merged

force-clean #619

merged 5 commits into from
Nov 11, 2021

Conversation

fishmonger45
Copy link
Contributor

obviously we don't want this all in main.ts but not entirely sure where to put it; all other options are small configuration options so don't have dedicated files

@@ -29,6 +29,11 @@ export function getYargsOption() {
demandOption: false,
describe: 'Use local mode',
},
'force-clean': {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want a command so its like subql-node force-clean --subquery-name=app

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm ok with what it is now, basically means clean data and start indexing. If we make it a subcommand, it will only be used to clean data.

Copy link
Contributor Author

@fishmonger45 fishmonger45 Nov 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good points, i was tossing up which way to implement but ended up going with how it is now because during development it's very likely that you're going to want to clean the project and then start indexing immediately (make changes to schema, clean, and then index and test on the playground)

@jiqiang90
Copy link
Contributor

jiqiang90 commented Nov 10, 2021

obviously we don't want this all in main.ts but not entirely sure where to put it; all other options are small configuration options so don't have dedicated files

I think rather than remove record in db at the very beginning, we need to validate the project.
We can move this step to before the apiService.init() but after validate the custom data source, or within the ensureProject
https://github.com/subquery/subql/blob/main/packages/node/src/indexer/indexer.manager.ts#L141

@fishmonger45 fishmonger45 marked this pull request as ready for review November 10, 2021 03:28
Copy link
Collaborator

@ianhe8x ianhe8x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls check tests, not sure why it stuck there

packages/node/src/main.ts Outdated Show resolved Hide resolved
packages/node/src/indexer/indexer.manager.ts Outdated Show resolved Hide resolved
packages/node/src/indexer/indexer.manager.ts Outdated Show resolved Hide resolved
packages/node/src/indexer/indexer.manager.ts Outdated Show resolved Hide resolved
@fishmonger45
Copy link
Contributor Author

fishmonger45 commented Nov 11, 2021

my bad, didn't ping anyone when I made changes, @ianhe8x, this good?

@ianhe8x ianhe8x merged commit db5eaa4 into subquery:main Nov 11, 2021
bz888 pushed a commit that referenced this pull request Jun 3, 2022
* force-clean

* move force-clean to ensureProject

* better description wording

* refactor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants