misc/migration/3.16.0_Any.py
author David Douard <david.douard@logilab.fr>
Wed, 24 Jul 2013 08:20:22 +0200
branchstable
changeset 9182 75493f6ca586
parent 8675 b60329e40e26
permissions -rw-r--r--
[datafeed] add a timeout config option (closes #2745677) So a HTTP GET do not hang forever in the datafeed looping task.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8675
b60329e40e26 [rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     1
sync_schema_props_perms('EmailAddress')
b60329e40e26 [rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     2
b60329e40e26 [rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     3
for source in rql('CWSource X WHERE X type "pyrorql"').entities():
b60329e40e26 [rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     4
    sconfig = source.dictconfig
b60329e40e26 [rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     5
    nsid = sconfig.pop('pyro-ns-id', config.appid)
b60329e40e26 [rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     6
    nshost = sconfig.pop('pyro-ns-host', '')
b60329e40e26 [rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     7
    nsgroup = sconfig.pop('pyro-ns-group', ':cubicweb')
b60329e40e26 [rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     8
    if nsgroup:
b60329e40e26 [rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     9
        nsgroup += '.'
b60329e40e26 [rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    10
    source.cw_set(url=u'pyro://%s/%s%s' % (nshost, nsgroup, nsid))
b60329e40e26 [rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    11
    source.update_config(skip_unknown=True, **sconfig)
b60329e40e26 [rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    12
b60329e40e26 [rql sources] uses an URL as remote host address for pyro/zmq rql sources,
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    13
commit()