Skip to content

Commit 09e5b6e

Browse files
committed
Delete unused functions
1 parent 41a3ef8 commit 09e5b6e

File tree

2 files changed

+0
-66
lines changed

2 files changed

+0
-66
lines changed

backend/src/BuiltinCli/Libs/Process.fs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -71,24 +71,6 @@ let fns : List<BuiltInFn> =
7171
deprecated = NotDeprecated }
7272

7373

74-
{ name = fn "processGetPid" 0
75-
typeParams = []
76-
parameters = [ Param.make "unit" TUnit "" ]
77-
returnType = TInt64
78-
description = "Returns the current process ID (PID)."
79-
fn =
80-
(function
81-
| _, _, _, [ DUnit ] ->
82-
uply {
83-
let pid = System.Diagnostics.Process.GetCurrentProcess().Id
84-
return DInt64(int64 pid)
85-
}
86-
| _ -> incorrectArgs ())
87-
sqlSpec = NotYetImplemented
88-
previewable = Impure
89-
deprecated = NotDeprecated }
90-
91-
9274
{ name = fn "processIsRunning" 0
9375
typeParams = []
9476
parameters = [ Param.make "pid" TInt64 "Process ID to check" ]

packages/darklang/cli/syncService.dark

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -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
286238
let autoStart () : Unit =

0 commit comments

Comments
 (0)