Sorry, my bad. I realised that I had to restart scheduler workers, not uWSGI workers. So I restarted the scheduler workers and it worked.
Sorry for the bother! El viernes, 12 de octubre de 2018, 12:04:40 (UTC-3), Lisandro escribió: > > I'm facing a weird issue: I have a scheduler task that is defined inside a > module. At the same time, that function calls another function that is > defined in **another** module. > I had to make some changes to the last module, so I restarted uWSGI, but > the task is still running with the old code :/ > > This is more or less what I have: > > in models/scheduler.py > def mytask(): > from general import do_something > do_something() > > > in modules/general.py > def do_something(): > from particular import do_another_stuff > print "hi there I'm doing something" > do_another_stuff() > return True > > > in modules/particular.py > def do_another_stuff(): > print "hi there I'm doing another stuff" > > > I've recently changed the code of modules/particular.py but they aren't > reflected. > Notice that I also changed the code of modules/general.py and those > changes **are** in deed reflected. > > I can't recall exactly now, but I remember having recently dealed with a > similar issue: a scheduled task whose code is defined in a module that at > the same time calls a function defined in another module. In this scenario, > changes to the last module aren't reflected when the task is run from the > scheduler environment. Does it make sense? > > I've also tried deleting modules/*.pyc but it didn't work. > What am I missing? > > -- 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. For more options, visit https://groups.google.com/d/optout.