comparison src/heartbeat.js.luan @ 92:c41e200c3e76

try to fix lost posts
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 31 Mar 2025 15:43:14 -0600
parents 3053a4fc10be
children
comparison
equal deleted inserted replaced
91:9196d936d4fa 92:c41e200c3e76
32 Io.stdout = Http.response.text_writer() 32 Io.stdout = Http.response.text_writer()
33 33
34 local last_update = Http.request.parameters.last_update or error() 34 local last_update = Http.request.parameters.last_update or error()
35 last_update = to_number(last_update) or error(last_update) 35 last_update = to_number(last_update) or error(last_update)
36 local user_last_update = user.last_update() 36 local user_last_update = user.last_update()
37 if time_now() - user_last_update > 70000 and last_update < user_last_update then 37 if time_now() - user_last_update > 10000 and last_update < user_last_update then
38 logger.info "update" 38 logger.info "update"
39 %> 39 %>
40 location = '/'; 40 location = '/';
41 <% 41 <%
42 return 42 return