NetTalk Central

Author Topic: Logout all users  (Read 3725 times)

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Logout all users
« on: October 26, 2013, 10:01:55 AM »
Hallo,


Is there a command to logout all users? of course except admin or my session :o)
I need this because we have some process that request exclusive access to data base and we want to be sure no one is connected.

How can I do this?

Thanks,
Robert

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Logout all users
« Reply #1 on: October 27, 2013, 04:41:05 AM »
Hi Robert,

Your question shows a lack of understanding of the NetTalk architecture.

>> and we want to be sure no one is connected.

no one is ever connected, outside of a request being processed. And requests have nothing to do with Logins.
If you want to lock the table, then do a lock on the table (waiting until you can get exclusive access) and then do what you need to do.

cheers
Bruce

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: Logout all users
« Reply #2 on: October 27, 2013, 11:01:25 PM »
Hallo Bruce,


My idea was how to logout all user and display login page (or put on the login page a message). To simulate like the session expired. This is what I want to accomplish in elegant way. If it's not possible then I could restart the server and set a flag for users so they could wait until data base is updated...

Thanks,
Robert

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Logout all users
« Reply #3 on: October 27, 2013, 11:49:16 PM »
How long will your process take to run?

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: Logout all users
« Reply #4 on: October 28, 2013, 12:53:48 AM »
no more then 30sec....something from 15 to 30 sec.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Logout all users
« Reply #5 on: October 28, 2013, 01:19:52 AM »
Then I would just "do the process" - there's no need to end other sessions, or log anyone out, or anything like that.

What I'd do is set a global, unthreaded variable to 1 when I started the process, and cleared it when I end the process.
Then in other places that use the same tables just "wait" until the variable is cleared before processing the request.

cheers
Bruce


Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: Logout all users
« Reply #6 on: October 28, 2013, 06:14:25 AM »
Hallo Bruce,
Noted and thank you.
I will test to see how it works this option.
Robert