Abaksoft Posted August 10, 2021 Share Posted August 10, 2021 Hi Farshad, I have an application deployed as Service / Hyperserver (Build 1549) wich works fine. This application use an UniThreadTimer1 wich do something on background task, (NodeZero) (Without Browser opened) like this : procedure TUniServerModule.UniThreadTimer1Timer(Sender: TObject); begin UniThreadTimer1.Lock; try //============== if NodeZero then begin DoSomething; end; //============== finally UniThreadTimer1.Release; end; end; All works fine. However, when I deploy a new release to my customer (as usually we do : 192.168.1.11:8077/server) the new DoSomething requires to Stop / Restart the Service again. Which is unfortunate, because we are losing this fabulous deployment option. Fore info : The UniThreadTimer1 is not enabled at Designtime. I tried to started it on both : once on ServerStartup and once on Create but without suscces. I have to Stop and Restart the Service after deploy. : procedure TUniServerModule.UniGUIServerModuleServerStartup(Sender: TObject); begin UniThreadTimer1.Enabled:=True; end; procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin UniThreadTimer1.Enabled:=True; end; What do you think ? Thx. Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted August 11, 2021 Author Share Posted August 11, 2021 Dear Farshad, After investigation, it seems that the Remote Deployment, can't refresh a Thread, With uniapplication as : Service / HyperServer (NodeZero or without NodeZero). (Build 1549) Test : 1. Build a small UniApplication (32 bits or 64 bits) : Put just an UniTreadTimer1 on ServerModule for doing something. procedure TUniServerModule.UniThreadTimer1Timer(Sender: TObject); begin UniThreadTimer1.Lock; try //============== DoSomething; //============== finally UniThreadTimer1.Release; end; end; 2. Install it and Start HyperServer.... 3. Upload a new release of this Uniapplication (DoSomething2) via Remote Deployment 3. Result : no effect (no update) ! Solution : if we Stop/Restart HyperServer (cmd command) that run the new update. Do I do something wrong ? Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted August 14, 2021 Author Share Posted August 14, 2021 Dear Farshad, Sorry for the Alert. That works fine. I had two problem : The Node creation and the DB Connexion. I forgot that on HyperServer each Node is creat on Server Creat and not on ServerStartUp Event. procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin //1. My_Connexion:=TIBCConnection.Create(Nil); //2. Connexion; //3. UniThreadTimer1.Enabled:=True; end; procedure TUniServerModule.UniGUIServerModuleDestroy(Sender: TObject); begin //1. UniThreadTimer1.enabled:=False; //2. FreeAndNil(My_Connexion); end; After tha all is well done. Sorry again... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.