@@ -233,54 +233,6 @@ let stop () : Stdlib.Result.Result<Unit, String> =
233233 | None -> Stdlib.Result.Result.Error "Sync service is not running"
234234
235235
236- /// Get the status of the sync service
237- type SyncServiceStatus =
238- { running: Bool
239- pid: Stdlib.Option.Option<Int64>
240- instance: Stdlib.Option.Option<String>
241- intervalSeconds: Stdlib.Option.Option<Int64> }
242-
243- let status () : SyncServiceStatus =
244- let running = isRunning ()
245- let pid = readPid ()
246-
247- // Get instance name from config, or fall back to "instance2"
248- let instance =
249- match Config.get "sync.default_instance" with
250- | Some name -> Stdlib.Option.Option.Some name
251- | None -> Stdlib.Option.Option.Some "instance2 (default)"
252-
253- let intervalSeconds =
254- match Config.get "sync.interval_seconds" with
255- | Some intervalStr ->
256- (match Stdlib.Int64.parse intervalStr with
257- | Ok interval -> Stdlib.Option.Option.Some interval
258- | Error _ -> Stdlib.Option.Option.None)
259- | None -> Stdlib.Option.Option.None
260-
261- SyncServiceStatus
262- { running = running
263- pid = pid
264- instance = instance
265- intervalSeconds = intervalSeconds }
266-
267-
268- /// Restart sync service
269- /// Stops the current service if running, then starts a new one
270- let restart () : Stdlib.Result.Result<Unit, String> =
271- // Force kill existing service if running (don't wait for graceful shutdown)
272- match readPid () with
273- | Some pid ->
274- let _ = Builtin.processKill pid
275- let _ = Builtin.fileDelete (pidFilePath ())
276- let _ = Builtin.fileDelete (shutdownSignalPath ())
277- log "Sync service force-killed for restart"
278- | None -> ()
279-
280- // Start immediately
281- startInBackground ()
282-
283-
284236/// Auto-start the sync service if not already running
285237/// Called during CLI startup
286238let autoStart () : Unit =
0 commit comments