#1 2023-11-25 04:34:20

pcpes2lante
Member
From: Philippines
Registered: 2016-03-29
Posts: 4

ServicesRun equivalent in mORMot2

Tried grep searching for ServicesRun in momot2 sources but could not find the implementation codes.  In mormot1 it is under mORMotService.pas.  Is there an equivalent global function to start registered services from the main application?

TIA

Offline

#2 2023-11-27 08:38:00

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,662
Website

Re: ServicesRun equivalent in mORMot2

In fact, only TServiceSingle works in mORmot 2.
The multi-service feature of mORMot 1 was never properly working, so has been disabled.

So you should just instantiate a TServiceSingle instance (and not a TService) then call the global ServiceSingleRun method.

See how TSynDaemon.Command handle cNone kind of request:
https://github.com/synopse/mORMot2/blob … n.pas#L545

I have made the documentation more explicit about all this:
https://github.com/synopse/mORMot2/commit/05da7807

Online

#3 2023-12-01 08:42:43

pcpes2lante
Member
From: Philippines
Registered: 2016-03-29
Posts: 4

Re: ServicesRun equivalent in mORMot2

Thank you so much AB

Offline

Board footer

Powered by FluxBB