From 2b678ff1be71a503b729dff1517af6ca891f3f40 Mon Sep 17 00:00:00 2001 From: tocmo0nlord Date: Sat, 14 Mar 2026 02:58:09 +0000 Subject: [PATCH] feat: add background geocoding cron job (20 records every 2 minutes) --- work_trace/data/wt_geocode_cron.xml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 work_trace/data/wt_geocode_cron.xml diff --git a/work_trace/data/wt_geocode_cron.xml b/work_trace/data/wt_geocode_cron.xml new file mode 100644 index 00000000..1e90aafd --- /dev/null +++ b/work_trace/data/wt_geocode_cron.xml @@ -0,0 +1,27 @@ + + + + + + + WorkTrace: Geocode Location Logs (batch) + + code + +pending = env['wt.location.log'].search([('latitude', '!=', 0), ('address', '=', False)], limit=1) +if pending: + env['wt.location.log'].action_geocode_all_pending() +else: + env.ref('work_trace.ir_cron_geocode_location_logs').active = False + + 2 + minutes + -1 + True + 10 + + + + \ No newline at end of file