You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/migrate_to_turn/README.md
+17
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ We can do this in batches and repeat until we do the actual switch over from Rap
7
7
8
8
## SCRIPTS
9
9
10
+
There is one fetch script and 2 update script options. We can test out the different update option with larger batches and see which one works the best.
11
+
10
12
### fetch_rapidpro_contacts.py
11
13
12
14
This fetches all the contacts from Rapidpro based on the start and end date provided, you can also configure a limit.
@@ -19,6 +21,8 @@ It will also output the latest modified on date in the batch, this can then be u
19
21
20
22
### update_turn_contacts.py
21
23
24
+
Update using the turn contacts api asynchronously.
25
+
22
26
This script takes a filename of a file generated by the `fetch_rapidpro_contacts.py` script as a parameter and updates all the contact in the file on Turn.
23
27
24
28
It is an async script and `CONCURRENCY` can be updated to control the speed, to avoid hitting the Turn API rate limits.
@@ -28,6 +32,19 @@ Command to run:
28
32
29
33
The output is sent to a json file, which can be used to retry failed requests.
30
34
35
+
### update_turn_contacts_queue.py
36
+
37
+
Update using the turn contacts api asynchronously but using a queue and workers. It will sleep if it gets rate limited by turn.
38
+
39
+
This script takes a filename of a file generated by the `fetch_rapidpro_contacts.py` script as a parameter and updates all the contact in the file on Turn.
40
+
41
+
It is an async script and `WORKER_COUNT` can be configured, to change the amount being processed at a time.
0 commit comments