[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Pulp-list] Repo sync check to prevent disturbing an on-going sync

Hash: SHA1

On 04/08/2011 06:47 PM, John Matthews wrote:
> ----- Forwarded Message -----
> From: "John Matthews" <jmatthew redhat com>
> Sent: Friday, April 8, 2011 6:42:02 PM
> We added a check in repo.py:_sync() which will limit 1 sync at a time per repository.  The check is done using a boolean flag stored on the repo model object.
> It's still possible to sync multiple different repositories at the same time, the limit we've added is to prevent multiple sync operations on the same exact repository.
> This will prevent possible issues with recurring repo syncs colliding with on-demand syncs.  
> Note: To prevent potential issues of pulp being shutdown uncleanly and a repo being locked in a bad state a 'clean' operation is performed on pulp startup.
> Commit is here:
> http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=33ef2654804e6f9a0b2bbd575e493f9a9e206f1a
> If you see any issues please let me know.

So what is returned to me when I call sync but a sync is already running?

What happens if I am running a manual sync and during that time, the
recurring task hits its scheduled time and tries to run? Does it just
skip and run at its next interval (this is the preferred behavior IMO)?
Will it just run again right after the manual one is done (not as good)?

Is it possible to cancel a scheduled sync that is running and have it
just requeue for the next scheduled interval?

How do I retrieve the next scheduled sync time on a repo? I see
last_sync in the repo metadata, but not next_sync. The use case being
"I'm thinking of kicking off a manual sync, but if one's gonna run in
the next hour I won't bother."

More to that last point, what I'm thinking for the RHUI UI is to show
something like:

Next Sync    Last Sync     Repo

I won't bother with sample data since email client fonts will just mess
it up, but you get the idea.

- -- 
Jay Dobies
RHCE# 805008743336126
Freenode: jdob
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]