Skip to content
This repository has been archived by the owner on Mar 31, 2018. It is now read-only.

trigger_bulk_sync missing #4

Open
spinus opened this issue Mar 28, 2013 · 8 comments
Open

trigger_bulk_sync missing #4

spinus opened this issue Mar 28, 2013 · 8 comments

Comments

@spinus
Copy link

spinus commented Mar 28, 2013

I cannot find where the command trigger_bulk_sync is. I think it was lost at some moment.

@xordoquy
Copy link
Contributor

xordoquy commented Apr 3, 2013

Thanks to dstufft, here's a workaround:

python manage.py shell
Python 2.7.3 (default, Aug  1 2012, 05:14:39) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from crate.pypi.tasks import bulk_synchronize
>>> bulk_synchronize.delay()
<AsyncResult: f14e3095-5819-4c43-aab5-820067b70c08>
>>> 

@spinus
Copy link
Author

spinus commented Apr 3, 2013

Thanks, I just found that commit and do "manual" cherry-pick. (aka copy-paste). If you want I can do a pull request in a free time.

Q: trigger_bulk_sync should be used only for initial mirroring or for update too?

@xordoquy
Copy link
Contributor

xordoquy commented Apr 3, 2013

If I'm not mistaken, this should be for initial mirroring.
For later synchronizations, I think the synchronize task would do the job (https://github.com/crateio/crate.pypi/blob/master/crate/pypi/tasks.py#L72)

@xordoquy
Copy link
Contributor

xordoquy commented Apr 3, 2013

Reading the synchronize task, it even looks like this could be the only one used.
If it doesn't see any prior sync, it'll call the bulk_syncrhonize (https://github.com/crateio/crate.pypi/blob/master/crate/pypi/tasks.py#L99)

@spinus
Copy link
Author

spinus commented Apr 3, 2013

Thanks for quick response. So probably I can make a manage.py crate_sync for it too, or it is magically triggered somewhere from webgui?

@xordoquy
Copy link
Contributor

xordoquy commented Apr 3, 2013

I don't see that command on my latests crate checkout.

@spinus
Copy link
Author

spinus commented Apr 3, 2013

When I wrote make I meant I wrote command to call task you pointed.

@InQuant
Copy link

InQuant commented May 2, 2013

Just created a buildout under https://github.com/InQuant/buildout_crate.io

Installs Redis, PostgreSQL, ElasticSearch, Flower.
Also fixes the trigger_bulk_sync command.

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

No branches or pull requests

2 participants