Skip to content

Commit b8ed09b

Browse files
committed
Fix misprints
1 parent 80ab8a5 commit b8ed09b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/use-cases/pre-aggregated-reports.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ updates. Consider the following :py:func:`preallocate` function:
382382
'page': page }
383383
# Get monthly metadata
384384
monthly_metadata = {
385-
'date': daily_m['d'].replace(day=1),
385+
'date': daily_metadata['date'].replace(day=1),
386386
'site': site,
387387
'page': page }
388388

@@ -432,7 +432,7 @@ probability," you can limit redundant :py:func:`preallocate` calls.
432432

433433
def log_hit(db, dt_utc, site, page):
434434
if random.random() < prob_preallocate:
435-
preallocate(db, dt_utc + timedelta(days=1), site_page)
435+
preallocate(db, dt_utc + timedelta(days=1), site, page)
436436
# Update daily stats doc
437437
...
438438

@@ -458,7 +458,7 @@ resource (i.e. ``/index.html``) with minute-level granularity:
458458

459459
.. code-block:: pycon
460460

461-
>>>``db.stats.daily.find_one(
461+
>>> db.stats.daily.find_one(
462462
... {'metadata': {'date':dt, 'site':'site-1', 'page':'/index.html'}},
463463
... { 'minute': 1 })
464464

@@ -469,7 +469,7 @@ over the last day, with hour-level granularity:
469469

470470
>>> db.stats.daily.find_one(
471471
... {'metadata': {'date':dt, 'site':'site-1', 'page':'/foo.gif'}},
472-
... { 'hy': 1 })
472+
... { 'hourly': 1 })
473473

474474
If you want a few days of hourly data, you can use a query in the
475475
following form:

0 commit comments

Comments
 (0)