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

Add command to reindex existing data (fixes #20) #56

Merged
merged 5 commits into from
Sep 12, 2017

Conversation

leplatrem
Copy link
Contributor

Fixes #20

@Natim I let you take over. The only remaining challenge is to paginate the call to get_all(). The rest seems to work according to a few quick manual tests

if cli_args is None:
cli_args = sys.argv[1:]

parser = argparse.ArgumentParser()
Copy link
Member

Choose a reason for hiding this comment

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

Do you think we could work on adding an entry-point so that plugins can add sub-commands to the kinto command?

Copy link
Member

Choose a reason for hiding this comment

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

I have created Kinto/kinto#1330 about that.

print("No `index:schema` attribute found in collection metadata.")
return 42

# XXX: Are you sure?
Copy link
Member

@Natim Natim Sep 8, 2017

Choose a reason for hiding this comment

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

Instead we could add a --dry-run or a `--recreate`` attribute

@Natim Natim changed the title [WIP] Add command to reindex existing data (fixes #20) Add command to reindex existing data (fixes #20) Sep 8, 2017
Copy link
Member

@Natim Natim left a comment

Choose a reason for hiding this comment

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

It seems good to me.


kinto.permission_backend = kinto.core.permission.postgresql
kinto.permission_url = postgres://postgres:postgres@localhost:5432/postgres

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Natim is this intentional?

Copy link
Member

Choose a reason for hiding this comment

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

Yes for tests i guess.

@leplatrem leplatrem merged commit 9f344cd into master Sep 12, 2017
@leplatrem leplatrem deleted the 20-index-existing-records branch September 12, 2017 16:05
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.

None yet

2 participants