Skip to content

Commit

Permalink
Added notes about locks being cleared after 4 weeks
Browse files Browse the repository at this point in the history
  • Loading branch information
nickanderson committed Nov 14, 2023
1 parent ec78597 commit 5a5789b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 23 deletions.
19 changes: 7 additions & 12 deletions reference/components/cf-agent.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ hostnamekeys => "true";
**Description:** The value of `ifelapsed` is a global default representing
the time that must elapse before a promise will be rechecked.

This overrides the global settings. Promises which take a long time
This configures the default setting for `cf-agent`. Promises which take a long time
to verify should usually be protected with a long value for this
parameter. This serves as a resource 'spam' protection. A CFEngine
check could easily run every 5 minutes provided resource intensive
Expand All @@ -877,22 +877,17 @@ another which is not tied to a specific time.
**Example:**

```cf3
#local
body action example
{
ifelapsed => "120"; # 2 hours
expireafter => "240"; # 4 hours
}
# global
body agent control
{
ifelapsed => "180"; # 3 hours
ifelapsed => "180"; # 3 hours
}
```

**Notes:**
* This is not a reliable way to control frequency over a long period of time.
* Locks provide simple but weak frequency control.
* Locks older than 4 weeks are automatically purged.

**See also:** [Promise locking][Promises#Promise locking], [ifelapsed action body attribute][Promise types#ifelapsed]

### inform
Expand Down
17 changes: 6 additions & 11 deletions reference/promise-types.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -94,24 +94,19 @@ for the specific promise it's attached to.
**Example:**

```cf3
#local
body action example
{
ifelapsed => "120"; # 2 hours
expireafter => "240"; # 4 hours
}
# global
body agent control
{
ifelapsed => "180"; # 3 hours
}
```

**See also:** [promise locking][Promises#Promise locking], [ifelapsed in body agent control][cf-agent#ifelapsed],
[`ifelapsed` and function caching][Functions#function caching]
**Notes:**
* This is not a reliable way to control frequency over a long period of time.
* Locks provide simple but weak frequency control.
* Locks older than 4 weeks are automatically purged.

**See also:** [promise locking][Promises#Promise Locking], [ifelapsed in body agent control][cf-agent#ifelapsed], [`ifelapsed` and function caching][Functions#function caching]

**History:**

Expand Down

0 comments on commit 5a5789b

Please sign in to comment.