Thank you for the replies!  I am going to try being more explicit and see 
if that cleans things up

On Wednesday, June 29, 2016 at 5:53:36 PM UTC-4, Dave S wrote:
>
>
>
> On Wednesday, June 29, 2016 at 11:59:23 AM UTC-7, Niphlod wrote:
>>
>> you need to be explicit everywhere if you are not in a web request 
>> environment. 
>>
>> On Wednesday, June 29, 2016 at 2:57:37 PM UTC+2, Jason Solack wrote:
>>>
>>> I am, i am passing db into some modules, do i need to be explicit about 
>>> db.commit within modules?
>>>
>>
> It may be enough, though, to do the commit in the task's top-level 
> procedure (what you queue for the scheduler), when you've returned from the 
> calls into the modules.  That would depend in part on whether rolling back 
> a single transaction is adequate, or whether you need several transactions 
> to capture progress along the task.
>
> (My scheduler job isn't an example -- it's read-only on the db -- but the 
> functions to handle starting and stopping the scheduling, and adding a 
> "manual" run to the schedule (that is, running the task an extra time to 
> handle something between periodic runs) are done with functions in 
> controller/default.py using the -S switch, and each of those does a 
> db.commit so that the scheduler sees the changes.)
>
> /dps
>
>
>  
>
>>
>>> On Tuesday, June 28, 2016 at 3:22:42 PM UTC-4, Niphlod wrote:
>>>>
>>>> are you explicitely calling db.commit() at the end of your taks ?
>>>>
>>>> On Tuesday, June 28, 2016 at 6:36:02 PM UTC+2, Jason Solack wrote:
>>>>>
>>>>> Hello all, i am running an app that utilizes the scheduler and i'm 
>>>>> seeing a lot of open transaction in SQL server with the last sql command 
>>>>> being:
>>>>>
>>>>> IF @@TRANCOUNT > 0 COMMIT BEGIN TRANSACTION
>>>>>
>>>>> any idea where those are being generated and how to close those 
>>>>> transactions?
>>>>>
>>>>> Thank you
>>>>>
>>>>> Jason
>>>>>
>>>>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to