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:     /* should take no more than five minutes to run the install */
    12:     max_execution_time_seconds number := 10 * 60;
    13: begin
    14:     select rhn_command_q_inst_recid_seq.nextval
    15:     into command_instance_id
    16:     from dual;
    17:     insert into rhn_command_queue_instances (
    18:         recid,
    19:         command_id,
    20:         notes,
    21:         expiration_date,
    22:         notify_email,
    23:         timeout,
    24:         date_submitted,
    25:         last_update_user,
    26:         last_update_date
    27:     )
    28:     values (
    29:         command_instance_id,
    30:         install_command,
    31:         null, /* no notes */
    32:         sysdate + (stale_after_minutes / (60*24)),
    33:         null, /* no notification email */
    34:         max_execution_time_seconds,
    35:         sysdate,
    36:         username,
    37:         sysdate
    38:     );
    39: end rhn_prepare_install;