Re: [web2py] Web2py sessions in scheduler

45 views
Skip to first unread message
Message has been deleted

Massimiliano

unread,
Feb 17, 2020, 9:54:43 AM2/17/20
to web...@googlegroups.com
Have you tried if

session.forget(response) or session.forget() can help you?



On Mon, Feb 17, 2020 at 12:33 PM Frédéric Samson <frederic...@gmail.com> wrote:
Every scheduler task that is running stores a session in my database. Is there a way to not to store the session when request.is_scheduler is true?

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/55773be3-9155-465d-a90a-70eb25df520c%40googlegroups.com.


--
Massimiliano

Frédéric Samson

unread,
Feb 17, 2020, 8:44:32 PM2/17/20
to web2py-users
I tried this in the model file :

if request.is_scheduler:
session.forget(response)

and 

if request.is_scheduler:
session.forget()

but it still store sessions in the database.


Le lundi 17 février 2020 09:54:43 UTC-5, Massimiliano a écrit :
Have you tried if

session.forget(response) or session.forget() can help you?



On Mon, Feb 17, 2020 at 12:33 PM Frédéric Samson <frederic...@gmail.com> wrote:
Every scheduler task that is running stores a session in my database. Is there a way to not to store the session when request.is_scheduler is true?

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web...@googlegroups.com.


--
Massimiliano

Massimo Di Pierro

unread,
Feb 17, 2020, 10:51:32 PM2/17/20
to web2py-users
Try

   session._forget = True

Yet this should not be happening so hard to suggest a fix without seeing the code.

Dave S

unread,
Feb 18, 2020, 7:21:17 PM2/18/20
to web2py-users


On Monday, February 17, 2020 at 3:33:39 AM UTC-8, Frédéric Samson wrote:
Every scheduler task that is running stores a session in my database. Is there a way to not to store the session when request.is_scheduler is true?

Google doesn't make it clear, but checking "show at the top" should be reserved for long-lived threads, rather than for the topic of the day.

/dps
 
Reply all
Reply to author
Forward
0 new messages