Jesse James wrote:
> I am trying to develop a persistent scheduler (I'm using it today on a
> live site) that can run jobs that access the DB. I'm using sqlalchemy
> in my app.
> 
> When a job runs from the scheduler, the job runner code first grabs
> the job record from the db.
> The record has:
> jobname, module name, function name, when to run (including
> recurring), pickled parameter dictionary
> 
> The job runner loads the module, then invokes the function with its
> parameters.
> It works great unless the module it tries to load contains this:
> 
> import model
> 
> if it does, I get this:
> Traceback (most recent call last):
>   File "C:\Projects\VOR\tg\vor\jobs.py", line 210, in runJob
>     module = __import__(modname)
>   File "C:\Projects\VOR\tg\vor\account.py", line 4, in ?
>     import model
>   File "C:\Projects\VOR\tg\vor\model.py", line 11, in ?
>     Column("content", Unicode)
>   File "build\bdist.win32\egg\sqlalchemy\schema.py", line 128, in
> __call__
> ArgumentError: Table 'None.keyed_file' is already defined for this
> MetaData instance.
> 
> Does anyone have any idea what is wrong here?
> I'm open to any ideas at this point... I need to run jobs that access
> DB records through the model.
> So this is a bit of a bummer.
> 
> TIA,
> Jesse James
> 
Perhaps paste.turbogears.org your model.py that is not getting imported 
and someone can see whence this keyed_file problem originates.
Paul.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to