On 19 April 2010 02:32, Michael Hudson <[email protected]> wrote:
> update branch set next_mirror_time = CURRENT_TIMESTAMP AT TIME ZONE 'UTC'
> where id in (select branch from seriessourcepackagebranch where distroseries
> in (select distroseries.id from distroseries, distribution where
> distroseries.name in ('lucid', 'maverick') and distribution.name = 'ubuntu'
> limit 500))

Fwiw, to scatter the next_mirror_time over the next, say, 5 days you
can do something like:

  UPDATE branch SET next_mirror_time = (
    CURRENT_TIMESTAMP AT TIME ZONE 'UTC' + (
      random() * INTERVAL '5 days'))
  WHERE id ...

We've used this to band-aid checkwatches a few times :-/

Gavin.

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to