Package src :: Module osa_dispatcher :: Class Runner
[hide private]
[frames] | no frames]

Class Runner

source code


Nested Classes [hide private]
  client_factory
hash(x)

Inherited from jabber_lib.Runner: option, option_parser

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
read_config(self) source code
 
get_dispatcher_password(self, username) source code
 
create_dispatcher_password(self, length) source code
 
setup_config(self, config) source code
 
fix_connection(self, c)
After setting up the connection, do whatever else is necessary
source code
 
cleanup_roster(self, client, active_jids) source code
 
process_once(self, client)
To be overridden in a client class
source code
 
reap_pinged_clients(self) source code
 
_fetch_clients_to_be_pinged(self) source code
 
_get_push_state_id(self, state) source code
 
_register_dispatcher(self, jabber_id, hostname) source code
 
_get_client_jids(self) source code

Inherited from jabber_lib.Runner: check_cert, is_in_background, main, preprocess_once, print_message, process_cli_options, process_forever, push_to_background, setup_connection

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  _min_sleep = 10
  _max_sleep = 10
  _query_get_dispatcher_password = '\n select id, password\n ...
  _update_dispatcher_password = '\n update rhnPushDispatcher\...
  _query_reap_pinged_clients = <spacewalk.server.rhnSQL.sql_base...
  _query_fetch_clients_to_be_pinged = <spacewalk.server.rhnSQL.s...
  _query_update_clients_to_be_pinged = <spacewalk.server.rhnSQL....
  _query_update_register_dispatcher = <spacewalk.server.rhnSQL.s...
  _query_insert_register_dispatcher = <spacewalk.server.rhnSQL.s...
  _query_get_client_jids = <spacewalk.server.rhnSQL.sql_base.Sta...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

read_config(self)

source code 
Overrides: jabber_lib.Runner.read_config

setup_config(self, config)

source code 
Overrides: jabber_lib.Runner.setup_config

fix_connection(self, c)

source code 

After setting up the connection, do whatever else is necessary

Overrides: jabber_lib.Runner.fix_connection

process_once(self, client)

source code 

To be overridden in a client class

Overrides: jabber_lib.Runner.process_once
(inherited documentation)

Class Variable Details [hide private]

_query_get_dispatcher_password

Value:
'''
    select id, password
      from rhnPushDispatcher
     where jabber_id like :jabber_id
    '''

_update_dispatcher_password

Value:
'''
    update rhnPushDispatcher
       set password = :password_in
     where id = :id_in
    '''

_query_reap_pinged_clients

Value:
<spacewalk.server.rhnSQL.sql_base.Statement instance at 13998055366937\
6; statement=
        update rhnPushClient
           set state_id = :offline_id
         where state_id = :online_id
           and last_ping_time is not null
           and current_timestamp > next_action_time
    

_query_fetch_clients_to_be_pinged

Value:
<spacewalk.server.rhnSQL.sql_base.Statement instance at 13998055366944\
8; statement=
        select id, name, shared_key, jabber_id
          from rhnPushClient
         where state_id = :online_id
           and last_ping_time is not null
           and next_action_time is null
           and jabber_id is not null
...

_query_update_clients_to_be_pinged

Value:
<spacewalk.server.rhnSQL.sql_base.Statement instance at 13998055366952\
0; statement=
        update rhnPushClient
           set next_action_time = current_timestamp + numtodsinterval(\
:delta, 'second')
         where id = :client_id
    

_query_update_register_dispatcher

Value:
<spacewalk.server.rhnSQL.sql_base.Statement instance at 13998055366959\
2; statement=
            update rhnPushDispatcher
               set last_checkin = current_timestamp,
                   hostname = :hostname_in
             where jabber_id = :jabber_id_in
    

_query_insert_register_dispatcher

Value:
<spacewalk.server.rhnSQL.sql_base.Statement instance at 13998055366966\
4; statement=
                insert into rhnPushDispatcher
                       (id, jabber_id, last_checkin, hostname, passwor\
d)
                values (sequence_nextval('rhn_pushdispatch_id_seq'), :\
jabber_id_in, current_timestamp,
                       :hostname_in, :password_in)
...

_query_get_client_jids

Value:
<spacewalk.server.rhnSQL.sql_base.Statement instance at 13998055366973\
6; statement=
        select jabber_id, TO_CHAR(modified, 'YYYY-MM-DD HH24:MI:SS') m\
odified
          from rhnPushClient
         where jabber_id is not null