Two questions regarding unexpected shutdown

General questions about NeoBook

Moderator: Neosoft Support

Locked
bypass666
Posts: 10
Joined: Mon Jun 16, 2014 9:05 am

Two questions regarding unexpected shutdown

Post by bypass666 » Fri Aug 03, 2018 6:01 am

Hi there

I was using a database to store values for users logged in. The problem I found is that if the publication closed unexpectedly the database value would remain the same and the user could not log in again. This was not the only problem, the point of me using the login system was to protect records that were being modified.

I was going to make another system tray pub to possibly constantly monitor the first pub and change a registry entry created by the original publication,this could also run at startup in case of an unexpected shutdown, however this could equally fail.

Does anyone have have a possible workarkind for this?

Many thanks

User avatar
luishp
Posts: 410
Joined: Wed May 23, 2007 10:17 am
Location: Spain
Contact:

Re: Two questions regarding unexpected shutdown

Post by luishp » Sat Aug 04, 2018 1:04 am

We have faced a similar problem on our software BiblioControl (bibliocontrol.es).
To avoid that we have an "Unlock user" option on the admin panel that returns the "logged in" database registry to its original value for a given user.
Luis Hernández - SinLios Soluciones Digitales
http://sinlios.com

User avatar
Gaev
Posts: 3782
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada
Contact:

Re: Two questions regarding unexpected shutdown

Post by Gaev » Sat Aug 04, 2018 12:12 pm

bypass666:
I was going to make another system tray pub to possibly constantly monitor the first pub and change a registry entry created by the original publication,this could also run at startup in case of an unexpected shutdown, however this could equally fail.
Or, you could use the Timer object to write a timestamp to the user's record (say every 2 to 5 seconds) ... and when user attempts to log in (after a scheduled or unexpected shutdown), check this value ... if older than 2 to 5 seconds, do what is necessary to allow him/her to login again.

You could even clear this recorded timestamp value when the application is shut down (or user logs out) properly.

BTW, what causes the unexpected shut down ? ... something in the pub ? ... or hardware/software ? ... is it just the pub or do all running programs shut down ?
This was not the only problem, the point of me using the login system was to protect records that were being modified.
Can you elaborate ? ... is there a field in the record(s) that stores id of user ? ... if so, the afore mentioned check of timestamp can also clear this value in the record(s).

Locked