Mercurial > prosody-modules
annotate mod_log_mark/mod_log_mark.lua @ 2736:fff185e7ab73
mod_cloud_notify: Implement the "stripped stanzas" proposal.
See https://mail.jabber.org/pipermail/standards/2017-July/033089.html
author | tmolitor <thilo@eightysoft.de> |
---|---|
date | Mon, 14 Aug 2017 23:31:05 +0200 |
parents | 7be158b3376f |
children |
rev | line source |
---|---|
2173
d15df55f0a63
mod_log_mark: Make a global module (should only be loaded once anyways)
Kim Alvefur <zash@zash.se>
parents:
1869
diff
changeset
|
1 module:set_global(); |
d15df55f0a63
mod_log_mark: Make a global module (should only be loaded once anyways)
Kim Alvefur <zash@zash.se>
parents:
1869
diff
changeset
|
2 |
1869
02390829df1a
mod_log_mark: Module that sends a line to the log once per minute
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 local log = _G.log; |
02390829df1a
mod_log_mark: Module that sends a line to the log once per minute
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 |
2174
7be158b3376f
mod_log_mark: Try to prevent timer drift
Kim Alvefur <zash@zash.se>
parents:
2173
diff
changeset
|
5 module:add_timer(60-os.date("%S"), function (now) |
1869
02390829df1a
mod_log_mark: Module that sends a line to the log once per minute
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 log("info", "-- MARK --"); |
2174
7be158b3376f
mod_log_mark: Try to prevent timer drift
Kim Alvefur <zash@zash.se>
parents:
2173
diff
changeset
|
7 return 90 - ((now + 30) % 60); |
1869
02390829df1a
mod_log_mark: Module that sends a line to the log once per minute
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
8 end); |