Skip to content

Commit

Permalink
LB-1863 : Sometimes chained comment is being dublicated three times
Browse files Browse the repository at this point in the history
  • Loading branch information
ioanpocol committed Jul 8, 2014
1 parent cc9b835 commit 7273a6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/livedesk-seo/livedesk/core/impl/seo_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def syncSeoBlogs(self):
assert isinstance(thread, Thread), 'Invalid thread %s' % thread
if thread.is_alive(): continue

if not self.blogSeoService.checkTimeout(blogSeo.Id, self.timeout_inteval * self.sync_interval): continue
if not self.blogSeoService.checkTimeout(blogSeo.Id, self.timeout_inteval * self.sync_interval): continue

self.syncThreads[key] = Thread(name='blog %d seo' % blogSeo.Blog,
target=self._syncSeoBlog, args=(blogSeo,))
Expand Down
7 changes: 4 additions & 3 deletions plugins/livedesk-sync/livedesk/core/impl/chained_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,11 @@ def syncChains(self):
log.info('Chained thread for blog %d is alive', blogSync.Blog)
continue

if not self.blogSyncService.checkTimeout(blogSync.Id, self.timeout_inteval * self.sync_interval):
log.info('Chained thread for blog %d is already taken', blogSync.Blog)
continue

if not self.blogSyncService.checkTimeout(blogSync.Id, self.timeout_inteval * self.sync_interval):
log.info('Chained thread for blog %d is already taken', blogSync.Blog)
continue

self.syncThreads[key] = Thread(name='blog %d sync' % blogSync.Blog,
target=self._syncChain, args=(blogSync,))
self.syncThreads[key].daemon = True
Expand Down

0 comments on commit 7273a6f

Please sign in to comment.