Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012bGzgsxrmbBhDzeMV2L57D
19 lines
511 B
Lua
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)
|