Small adaptations due to changes in server
bzr revid: nicolas.vanhoren@openerp.com-20130129150556-12w6iwvq0ucmzqsx
This commit is contained in:
parent
8d881beaa8
commit
181ed0afe8
|
@ -18,3 +18,5 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import openerp.addons.web_im.im as im
|
|
@ -90,7 +90,7 @@ POLL_TIMER = 30
|
|||
DISCONNECTION_TIMER = POLL_TIMER + 5
|
||||
WATCHER_ERROR_DELAY = 10
|
||||
|
||||
if openerp.tools.config.options["gevent"]:
|
||||
if openerp.evented:
|
||||
import gevent
|
||||
import gevent.event
|
||||
|
||||
|
@ -164,7 +164,7 @@ class ImportController(openerp.addons.web.http.Controller):
|
|||
|
||||
@openerp.addons.web.http.jsonrequest
|
||||
def poll(self, req, last=None, users_watch=None, db=None, uid=None, password=None):
|
||||
if not openerp.tools.config.options["gevent"]:
|
||||
if not openerp.evented:
|
||||
raise Exception("Not usable in a server not running gevent")
|
||||
if db is not None:
|
||||
req.session._db = db
|
||||
|
@ -182,7 +182,7 @@ class ImportController(openerp.addons.web.http.Controller):
|
|||
|
||||
@openerp.addons.web.http.jsonrequest
|
||||
def activated(self, req):
|
||||
return not not openerp.tools.config.options["gevent"]
|
||||
return not not openerp.evented
|
||||
|
||||
|
||||
class im_message(osv.osv):
|
||||
|
|
Loading…
Reference in New Issue