rss_gen_report (public)

 rss_gen_report subscr_id

Defined in packages/rss-support/tcl/rss-generation-service-procs.tcl

Build a report, write it out, log it.

Parameters:
subscr_id

Partial Call Graph (max 5 caller/called nodes):
%3 fs::rss::build_feeds fs::rss::build_feeds (private) rss_gen_report rss_gen_report fs::rss::build_feeds->rss_gen_report news_update_rss news_update_rss (private) news_update_rss->rss_gen_report packages/file-storage/www/admin/rss-subscr-ae.tcl packages/file-storage/ www/admin/rss-subscr-ae.tcl packages/file-storage/www/admin/rss-subscr-ae.tcl->rss_gen_report packages/file-storage/www/admin/rss-subscrs.tcl packages/file-storage/ www/admin/rss-subscrs.tcl packages/file-storage/www/admin/rss-subscrs.tcl->rss_gen_report packages/news/www/admin/rss.tcl packages/news/ www/admin/rss.tcl packages/news/www/admin/rss.tcl->rss_gen_report acs_sc::invoke acs_sc::invoke (public) rss_gen_report->acs_sc::invoke db_1row db_1row (public) rss_gen_report->db_1row db_dml db_dml (public) rss_gen_report->db_dml rss_gen rss_gen (public) rss_gen_report->rss_gen rss_gen_report_file rss_gen_report_file (public) rss_gen_report->rss_gen_report_file

Testcases:
No testcase defined.
Source code:
    set start [clock seconds]

    db_1row subscr_info {}

    set datasource [acs_sc::invoke  -contract RssGenerationSubscriber  -operation datasource  -call_args $summary_context_id  -impl $impl_name]

    if { $datasource eq "" } {
        ns_log Error "Empty datasource returned from $impl_name for context  $summary_context_id in rss_gen_report. Probably because the  implementation hasn't been bound."
        return
    }
    set args ""
    foreach {name val} $datasource {
        regsub -all {[\]\[\{\}""\\$]} $val {\\&} val
        append args "-$name \"$val\" "
        if { [lsearch [list channel_link channel_title] $name] >= 0 } {
            set $name $val
        }
    }
    #ns_log notice "FORMER ad_apply [list rss_gen {*}$args]"
    set xml [rss_gen {*}$args]

    # Write report.
    set report_file [rss_gen_report_file  -summary_context_id $summary_context_id  -impl_name $impl_name  -assert]

    set fh [open $report_file w]
    puts $fh $xml
    fconfigure $fh -encoding [ns_config "ns/parameters" OutputCharset]
    close $fh

    # Copy some useful display information into the
    # subscriptions table.
    set extra_sql ""
    foreach col [list channel_title channel_link] {
        if {[info exists $col]} {
            append extra_sql ", $col = :$col"
        }
    }

    set last_ttb [expr {[clock seconds] - $start}]
    db_dml update_timestamp {}
Generic XQL file:
<fullquery name="rss_gen_report.update_timestamp">
    <querytext>
        update rss_gen_subscrs
        set lastbuild = CURRENT_TIMESTAMP,
            last_ttb = :last_ttb $extra_sql
            where subscr_id = :subscr_id
    </querytext>
</fullquery>

<fullquery name="rss_gen_report.subscr_info">
    <querytext>
        select i.impl_name,
               r.summary_context_id
        from acs_sc_impls i,
             rss_gen_subscrs r
        where r.subscr_id = :subscr_id
          and i.impl_id = r.impl_id
    </querytext>
</fullquery>
packages/rss-support/tcl/rss-generation-service-procs.xql

PostgreSQL XQL file:
packages/rss-support/tcl/rss-generation-service-procs-postgresql.xql

Oracle XQL file:
packages/rss-support/tcl/rss-generation-service-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: