-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
if cli_args is None: | ||
cli_args = sys.argv[1:] | ||
|
||
parser = argparse.ArgumentParser() |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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? |
There was a problem hiding this comment.
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
6ac688f
to
f6e2b41
Compare
4bafe14
to
c583578
Compare
There was a problem hiding this 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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Natim is this intentional?
There was a problem hiding this comment.
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.
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