Skip to content

Commit 356eddd

Browse files
Matthew Eganikonst
Matthew Egan
authored andcommitted
docs: use Thread model in batch sample code (#605)
The batch operations docs were using the TestModel class which is not explained in this section of the docs. The example code was supposed to use the Thread class.
1 parent 79fd479 commit 356eddd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/batch.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Here is an example using a context manager for a bulk write operation:
3838
.. code-block:: python
3939
4040
with Thread.batch_write() as batch:
41-
items = [TestModel('forum-{0}'.format(x), 'thread-{0}'.format(x)) for x in range(1000)]
41+
items = [Thread('forum-{0}'.format(x), 'subject-{0}'.format(x)) for x in range(1000)]
4242
for item in items:
4343
batch.save(item)
4444
@@ -49,7 +49,7 @@ Here is an example using an iterator for retrieving items in bulk:
4949

5050
.. code-block:: python
5151
52-
item_keys = [('forum-{0}'.format(x), 'thread-{0}'.format(x)) for x in range(1000)]
52+
item_keys = [('forum-{0}'.format(x), 'subject-{0}'.format(x)) for x in range(1000)]
5353
for item in Thread.batch_get(item_keys):
5454
print(item)
5555

0 commit comments

Comments
 (0)