Hello web2py community!
I created a shell script that essentially checks if web2py is running or
not. Every hour CRON will run my script. If web2py is not running then it
starts web2py from source with the following:
export web2py_path=/Users/superman/desktop/web2py
export port=8000
cd $web2py_path && ./web2py.py --nogui -p $port -i 0.0.0.0 -a
'mysecretpassword' &
This works just fine (almost). If I now navigate to one of my applications
that uses a SQLite database everything is fine. If I navigate to one of my
applications that uses an Oracle database (cx_Oracle driver) the
application throws a ticket with the following:
<type 'exceptions.RuntimeError'> Failure to connect, tried 5 times:
Traceback (most recent call last): File
"/Users/mgheith/Desktop/web2py/gluon/dal.py", line 7845, in __init__
self._adapter = ADAPTERS[self._dbname](**kwargs) File
"/Users/mgheith/Desktop/web2py/gluon/dal.py", line 688, in __call__ obj =
super(AdapterMeta, cls).__call__(*args, **kwargs) File
"/Users/mgheith/Desktop/web2py/gluon/dal.py", line 3221, in __init__ if
do_connect: self.find_driver(adapter_args,uri) File
"/Users/mgheith/Desktop/web2py/gluon/dal.py", line 830, in find_driver
raise RuntimeError("no driver available %s" % str(self.drivers))
RuntimeError: no driver available ('cx_Oracle',)
Why is it that when CRON runs my shell script that my application, which
uses the cx_Oracle driver, is throwing the ticket that no cx_Oracle driver
exists? If I run my shell script without CRON in the terminal all is fine.
Any ideas?
By the way- this isn't a web2py issue. It's a CRON thing, so for all you
CRON experts out there please advise :)
--
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.