Main Tables Views Materialized Views Indexes Constraints Triggers Procedures Functions Packages Sequences Java Sources Sanity Check Index DDL scrips
Arguments Source

RHN_PREPARE_INSTALL

Arguments:

NameData TypeDefault ValueIn/Out
USERNAMEVARCHAR2(40) IN
COMMAND_INSTANCE_IDNUMBER(12) IN/OUT
INSTALL_COMMANDNUMBER(12) IN
DDL script

Source

Legend: comment string keyword reserved word operator
     1: procedure
     2: rhn_prepare_install
     3: (
     4:     username            in rhn_command_queue_instances.last_update_user%type,
     5:     command_instance_id in out rhn_command_queue_instances.recid%type,
     6:     install_command     in rhn_command_queue_instances.command_id%type
     7: )
     8: is
     9:     /* ignore this command if it has not been run after five minutes */
    10:     stale_after_minutes number := 10;
    11: 
    12:     /* should take no more than five minutes to run the install */
    13:     max_execution_time_seconds number := 10 * 60;
    14: 
    15: begin
    16:     select rhn_command_q_inst_recid_seq.nextval
    17:     into command_instance_id
    18:     from dual;
    19: 
    20:     insert into rhn_command_queue_instances (
    21:         recid,
    22:         command_id,
    23:         notes,
    24:         expiration_date,
    25:         notify_email,
    26:         timeout,
    27:         date_submitted,
    28:         last_update_user,
    29:         last_update_date
    30:     )
    31:     values (
    32:         command_instance_id,
    33:         install_command,
    34:         null, /* no notes */
    35:         sysdate + (stale_after_minutes / (60*24)),
    36:         null, /* no notification email */
    37:         max_execution_time_seconds,
    38:         sysdate,
    39:         username,
    40:         sysdate
    41:     );
    42: end rhn_prepare_install;