Skip to content

Commit

Permalink
docs: move Node.magic_number to where it belongs
Browse files Browse the repository at this point in the history
  • Loading branch information
trehn committed Sep 21, 2017
1 parent e988ec7 commit 127e6fd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 11 additions & 0 deletions docs/content/guide/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,17 @@ A list of items on this node (instances of subclasses of `bundlewrap.items.Item`

<br>

**`.magic_number`**

A large number derived from the node's name. This number is very likely to be unique for your entire repository. You can, for example, use this number to easily "jitter" cronjobs:

'{} {} * * * root /my/script'.format(
node.magic_number % 60,
node.magic_number % 2 + 4,
)

<br>

**`.metadata`**

A dictionary of custom metadata, merged from information in [nodes.py](../repo/nodes.py.md) and [groups.py](../repo/groups.py.md)
Expand Down
11 changes: 1 addition & 10 deletions docs/content/repo/nodes.py.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,7 @@ A string used as a DNS name when connecting to this node. May also be an IP addr

Cannot be set at group level.


### magic_number

A large number derived from the node's name. This number is very likely to be unique for your entire repository. You can, for example, use this number to easily "jitter" cronjobs:

'{} {} * * * root /my/script'.format(
node.magic_number % 60,
node.magic_number % 2 + 4,
)

<br>

### metadata

Expand Down

0 comments on commit 127e6fd

Please sign in to comment.