Skip to content

Fix misprints #618

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

Merged
merged 1 commit into from
Feb 11, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions source/use-cases/pre-aggregated-reports.txt
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ updates. Consider the following :py:func:`preallocate` function:
'page': page }
# Get monthly metadata
monthly_metadata = {
'date': daily_m['d'].replace(day=1),
'date': daily_metadata['date'].replace(day=1),
'site': site,
'page': page }

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

def log_hit(db, dt_utc, site, page):
if random.random() < prob_preallocate:
preallocate(db, dt_utc + timedelta(days=1), site_page)
preallocate(db, dt_utc + timedelta(days=1), site, page)
# Update daily stats doc
...

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

.. code-block:: pycon

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

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

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

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