mirror of
https://github.com/logos-messaging/nim-sds.git
synced 2026-01-03 22:53:12 +00:00
adding startPeriodicTasks request
This commit is contained in:
parent
11cd637004
commit
e7a6435407
@ -51,6 +51,8 @@ int MarkDependenciesMet(void* ctx,
|
||||
SdsCallBack callback,
|
||||
void* userData);
|
||||
|
||||
int StartPeriodicTasks(void* ctx, SdsCallBack callback, void* userData);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@ -301,5 +301,17 @@ proc MarkDependenciesMet(
|
||||
userData,
|
||||
)
|
||||
|
||||
proc StartPeriodicTasks(
|
||||
ctx: ptr SdsContext, callback: SdsCallBack, userData: pointer
|
||||
): cint {.dynlib, exportc.} =
|
||||
checkLibsdsParams(ctx, callback, userData)
|
||||
handleRequest(
|
||||
ctx,
|
||||
RequestType.LIFECYCLE,
|
||||
SdsLifecycleRequest.createShared(SdsLifecycleMsgType.START_PERIODIC_TASKS),
|
||||
callback,
|
||||
userData,
|
||||
)
|
||||
|
||||
### End of exported procs
|
||||
################################################################################
|
||||
|
||||
@ -7,6 +7,7 @@ import ../../../../src/[reliability_utils, reliability, message]
|
||||
type SdsLifecycleMsgType* = enum
|
||||
CREATE_RELIABILITY_MANAGER
|
||||
RESET_RELIABILITY_MANAGER
|
||||
START_PERIODIC_TASKS
|
||||
|
||||
type SdsLifecycleRequest* = object
|
||||
operation: SdsLifecycleMsgType
|
||||
@ -62,5 +63,7 @@ proc process*(
|
||||
of RESET_RELIABILITY_MANAGER:
|
||||
resetReliabilityManager(rm[]).isOkOr:
|
||||
return err("error processing RESET_RELIABILITY_MANAGER request: " & $error)
|
||||
of START_PERIODIC_TASKS:
|
||||
rm[].startPeriodicTasks()
|
||||
|
||||
return ok("")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user