github::ActivityMonitor method next_backfill_event_id (protected)

 <instance of github::ActivityMonitor[i]> next_backfill_event_id

Defined in packages/xowiki/tcl/github-activity-monitor-procs.tcl

Helper for backfill_repo_history. Returns the next negative event_id to use.

Testcases:
No testcase defined.
Source code:
# smallest existing event_id (could be null, positive, or already negative)
set min_id [xo::dc get_value min_event_id {
    select min(event_id) from github_activity
}]

if {$min_id eq "" || $min_id >= 0} {
    # no rows, or only positive IDs so far -> start at -1
    return -1
} else {
    # already have negative IDs -> one step lower
    return [expr {$min_id - 1}]
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: