Try

   session._forget = True

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

On Monday, 17 February 2020 17:44:32 UTC-8, Frédéric Samson wrote:
>
> 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?
>>
>>
>> http://web2py.com/books/default/chapter/29/04/the-core?search=session.forget#session
>>
>>
>> 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.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/web2py/55773be3-9155-465d-a90a-70eb25df520c%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/web2py/55773be3-9155-465d-a90a-70eb25df520c%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> -- 
>> Massimiliano
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/baf0204e-2ff1-47b6-9c1a-e620ebe073a9%40googlegroups.com.

Reply via email to