Small tweaks to feed fetching locks.

This commit is contained in:
Samuel Clay 2010-08-19 19:54:44 -04:00
parent 5e438ac439
commit 4288283c95
4 changed files with 5 additions and 6 deletions

View file

@ -11,8 +11,8 @@ import re
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option("-a", "--all", dest="all", action="store_true", help="All feeds [for a user, or everybody]"),
make_option("-s", "--silent", dest="silent", action="store_true", help="Inverse verbosity."),
make_option("-a", "--all", dest="all", action="store_true", help="All feeds, need it or not (can be combined with a user)"),
make_option("-s", "--silent", dest="silent", default=False, action="store_true", help="Inverse verbosity."),
make_option("-u", "--user", dest="user", nargs=1, help="Specify user id or username"),
make_option("-d", "--daemon", dest="daemonize", action="store_true"),
)

View file

@ -540,7 +540,7 @@ class Feed(models.Model):
total, random_factor = self.get_next_scheduled_update()
next_scheduled_update = datetime.datetime.now() + datetime.timedelta(
minutes = total + random_factor)
minutes = int(total + random_factor))
self.next_scheduled_update = next_scheduled_update

View file

@ -393,7 +393,7 @@ a img {
#feed_list .feed.NB-feed-unfetched {
}
#feed_list .feed.NB-feed-exception .feed_count {
#feed_list .feed.NB-feed-exception .feed_counts {
display: none;
}

View file

@ -231,7 +231,6 @@ class Dispatcher:
connection.close()
current_process = multiprocessing.current_process()
lock = multiprocessing.Lock()
identity = "X"
if current_process._identity:
@ -245,7 +244,7 @@ class Dispatcher:
}
start_time = datetime.datetime.now()
feed.set_next_scheduled_update(lock=lock)
feed.set_next_scheduled_update()
### Uncomment to test feed fetcher
# from random import randint