mirror of
https://github.com/viq/NewsBlur.git
synced 2025-11-01 09:09:16 +00:00
Small tweaks to feed fetching locks.
This commit is contained in:
parent
5e438ac439
commit
4288283c95
4 changed files with 5 additions and 6 deletions
|
|
@ -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"),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue