Index: openacs-4/packages/acs-content-repository/sql/oracle/content-schedule.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-schedule.sql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-content-repository/sql/oracle/content-schedule.sql 24 Mar 2001 22:00:48 -0000 1.1 +++ openacs-4/packages/acs-content-repository/sql/oracle/content-schedule.sql 13 May 2001 01:55:58 -0000 1.2 @@ -106,56 +106,62 @@ -- Reset the last time of execution to start of processing update cr_scheduled_release_job set last_exec = this_exec; + -- Table was growing without bound (OpenACS DanW) + delete from cr_scheduled_release_log + where exec_date < sysdate - 4*7; + commit; end cr_scheduled_release_exec; / show errors -- initialize the scheduled publication job - -declare +-- job scheduling moved to aolserver (OpenACS - DanW) - v_job_id integer; - interval integer := 15; - cursor job_cur is - select job from user_jobs - where what = 'cr_scheduled_release_exec;'; +-- declare -begin +-- v_job_id integer; +-- interval integer := 15; - open job_cur; - fetch job_cur into v_job_id; +-- cursor job_cur is +-- select job from user_jobs +-- where what = 'cr_scheduled_release_exec;'; - if job_cur%NOTFOUND then +-- begin - dbms_output.put_line(' - Submitting job to process scheduled updates to live content...'); +-- open job_cur; +-- fetch job_cur into v_job_id; - dbms_job.submit( - job => v_job_id, - what => 'cr_scheduled_release_exec;', - next_date => sysdate, - interval => 'sysdate + ' || (interval/24/60) - ); +-- if job_cur%NOTFOUND then - update cr_scheduled_release_job set job_id = v_job_id; +-- dbms_output.put_line(' +-- Submitting job to process scheduled updates to live content...'); + +-- dbms_job.submit( +-- job => v_job_id, +-- what => 'cr_scheduled_release_exec;', +-- next_date => sysdate, +-- interval => 'sysdate + ' || (interval/24/60) +-- ); + +-- update cr_scheduled_release_job set job_id = v_job_id; - else +-- else - dbms_job.change( - job => v_job_id, - what => 'cr_scheduled_release_exec;', - next_date => sysdate, - interval => 'sysdate + ' || (interval/24/60) - ); +-- dbms_job.change( +-- job => v_job_id, +-- what => 'cr_scheduled_release_exec;', +-- next_date => sysdate, +-- interval => 'sysdate + ' || (interval/24/60) +-- ); - end if; +-- end if; -end; -/ -show errors +-- end; +-- / +-- show errors Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql,v diff -u -N -r1.16 -r1.17 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql 30 Apr 2001 20:04:46 -0000 1.16 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql 13 May 2001 01:55:58 -0000 1.17 @@ -1759,7 +1759,6 @@ v_revision_id cr_revisions.revision_id%TYPE; v_publish_date cr_revisions.publish_date%TYPE; begin - -- FIXME: what is up with this? both selects are the same. if get_publish_date__is_live then select Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql,v diff -u -N -r1.17 -r1.18 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql 12 May 2001 05:09:48 -0000 1.17 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql 13 May 2001 01:55:58 -0000 1.18 @@ -21,7 +21,7 @@ new__publish_date alias for $3; -- default now() new__mime_type alias for $4; -- default ''text/plain'' new__nls_language alias for $5; -- default null - -- blob id FIXME + -- lob id new__data alias for $6; new__item_id alias for $7; new__revision_id alias for $8; -- default null @@ -580,7 +580,7 @@ v_new_lob cr_revisions.lob%TYPE; v_content_type cr_revisions.content_type%TYPE; begin - -- FIXME + select content_length, item_id into Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-schedule.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-schedule.sql,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-schedule.sql 28 Apr 2001 19:58:39 -0000 1.5 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-schedule.sql 13 May 2001 01:55:59 -0000 1.6 @@ -95,6 +95,10 @@ exec__err_msg ); + -- Table was growing without bound (OpenACS DanW) + delete from cr_scheduled_release_log + where exec_date < now() - ''4 week''::interval; + -- Reset the last time of execution to start of processing update cr_scheduled_release_job set last_exec = exec__this_exec; @@ -106,6 +110,9 @@ -- show errors -- initialize the scheduled publication job + +-- Job scheduling has been moved to aolserver for both the oracle and +-- postgresql versions. DanW create function inline_1 () returns integer as ' Index: openacs-4/packages/acs-content-repository/tcl/acs-content-repository-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/acs-content-repository-init.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-content-repository/tcl/acs-content-repository-init.tcl 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-content-repository/tcl/acs-content-repository-init.tcl 13 May 2001 01:55:59 -0000 1.2 @@ -1 +1,14 @@ template::filter add content::init + +ad_proc -public acs_cr_scheduled_release_exec {} { + + This was handled by oracle, but since other dbs, such as postgresql don't + support job submission, the job scheduling has been moved to aolserver. + (OpenACS - DanW) + +} { + + db_exec_plsql schedule_releases {begin cr_scheduled_release_exec; end;} +} + +ad_schedule_proc [expr 15 * 60] acs_cr_scheduled_release_exec