Files
lichtkasten/LightroomPlugin/LichtkastenBridge.lrplugin/Init.lua
T

19 lines
511 B
Lua

local LrTasks = import 'LrTasks'
local LrLogger = import 'LrLogger'
local Bridge = require 'Bridge'
local log = LrLogger('LichtkastenBridge')
log:enable('logfile')
_G.LichtkastenRunning = true
LrTasks.startAsyncTask(function()
log:info('Lichtkasten Bridge gestartet, Inbox: ' .. Bridge.inbox())
while _G.LichtkastenRunning do
Bridge.heartbeat()
local ok, err = LrTasks.pcall(Bridge.processInbox)
if not ok then log:error('Fehler beim Verarbeiten: ' .. tostring(err)) end
LrTasks.sleep(2)
end
end)