{"action":"created","issue":{"url":"https://api.github.com/repos/vitalidze/traccar-web/issues/962","repository_url":"https://api.github.com/repos/vitalidze/traccar-web","labels_url":"https://api.github.com/repos/vitalidze/traccar-web/issues/962/labels{/name}","comments_url":"https://api.github.com/repos/vitalidze/traccar-web/issues/962/comments","events_url":"https://api.github.com/repos/vitalidze/traccar-web/issues/962/events","html_url":"https://github.com/vitalidze/traccar-web/issues/962","id":190725543,"number":962,"title":"Eamil notifications up to 10 minutes late","user":{"login":"xewonder","id":14354903,"avatar_url":"https://avatars.githubusercontent.com/u/14354903?v=3","gravatar_id":"","url":"https://api.github.com/users/xewonder","html_url":"https://github.com/xewonder","followers_url":"https://api.github.com/users/xewonder/followers","following_url":"https://api.github.com/users/xewonder/following{/other_user}","gists_url":"https://api.github.com/users/xewonder/gists{/gist_id}","starred_url":"https://api.github.com/users/xewonder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xewonder/subscriptions","organizations_url":"https://api.github.com/users/xewonder/orgs","repos_url":"https://api.github.com/users/xewonder/repos","events_url":"https://api.github.com/users/xewonder/events{/privacy}","received_events_url":"https://api.github.com/users/xewonder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-21T14:04:34Z","updated_at":"2016-11-22T07:48:24Z","closed_at":null,"body":"Version 3.7 \r\n\r\nHi,\r\n \r\nSometimes, email notifications are up to 10 minutes late. Looking at the wrapper log and smtp server log they are actually sent 10 minutes late???\r\n\r\nWhy would that be, and how an I fix it?\r\n\r\n\r\n\r\nI would also like for the system to scan for notifications more often than one minute because we need to notify VERY short term. (in city) How can I do that?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vitalidze/traccar-web/issues/comments/262170353","html_url":"https://github.com/vitalidze/traccar-web/issues/962#issuecomment-262170353","issue_url":"https://api.github.com/repos/vitalidze/traccar-web/issues/962","id":262170353,"user":{"login":"vitalidze","id":2294325,"avatar_url":"https://avatars.githubusercontent.com/u/2294325?v=3","gravatar_id":"","url":"https://api.github.com/users/vitalidze","html_url":"https://github.com/vitalidze","followers_url":"https://api.github.com/users/vitalidze/followers","following_url":"https://api.github.com/users/vitalidze/following{/other_user}","gists_url":"https://api.github.com/users/vitalidze/gists{/gist_id}","starred_url":"https://api.github.com/users/vitalidze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitalidze/subscriptions","organizations_url":"https://api.github.com/users/vitalidze/orgs","repos_url":"https://api.github.com/users/vitalidze/repos","events_url":"https://api.github.com/users/vitalidze/events{/privacy}","received_events_url":"https://api.github.com/users/vitalidze/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T07:48:24Z","updated_at":"2016-11-22T07:48:24Z","body":"Well, I have no other ideas, except to run a debug session to see what happens.\r\n\r\nYou are right about two timers:\r\n\r\n* https://github.com/vitalidze/traccar-web/blob/dev/src/main/java/org/traccar/web/server/model/EventServiceImpl.java#L454 - this one scans received positions and posts necessary events. There is a time when event was posted. You can check it for debugging.\r\n\r\n* https://github.com/vitalidze/traccar-web/blob/dev/src/main/java/org/traccar/web/server/model/NotificationServiceImpl.java#L344 - this one sends notifications. It just queries for all events with \"notification not sent\" flag, then looks for recipients and sends notifications with the javamail.\r\n\r\nI know that it works quite well and I haven't seen 10 minutes delay."}}
{"actor":{"display_login":"vitalidze"}}