changeset 5867 | ca62f9984f4b |
parent 5795 | 9d3d719db285 |
5866:9f2816287556 | 5867:ca62f9984f4b |
---|---|
39 end |
39 end |
40 module:log("debug", "Active users (took %ds): %d (24h), %d (7d), %d (30d)", os.time()-now, active_d1, active_d7, active_d30); |
40 module:log("debug", "Active users (took %ds): %d (24h), %d (7d), %d (30d)", os.time()-now, active_d1, active_d7, active_d30); |
41 measure_d1(active_d1); |
41 measure_d1(active_d1); |
42 measure_d7(active_d7); |
42 measure_d7(active_d7); |
43 measure_d30(active_d30); |
43 measure_d30(active_d30); |
44 |
|
45 return 3600 + (300*math.random()); |
|
46 end |
44 end |
47 |
45 |
46 -- Schedule at startup |
|
48 module:add_timer(15, update_calculations); |
47 module:add_timer(15, update_calculations); |
48 |
|
49 -- Recalculate hourly |
|
50 module:hourly(update_calculations); |