Show More
@@ -41,8 +41,9 b' class ThreadSource(models.Model):' | |||
|
41 | 41 | if self.thread.is_archived(): |
|
42 | 42 | logger.error('The thread {} is archived, please try another one'.format(self.thread)) |
|
43 | 43 | else: |
|
44 |
start_timestamp = |
|
|
44 | start_timestamp = self.timestamp | |
|
45 | 45 | last_timestamp = start_timestamp |
|
46 | logger.info('Start timestamp is {}'.format(start_timestamp)) | |
|
46 | 47 | if self.thread.is_bumplimit(): |
|
47 | 48 | logger.warn('The thread {} has reached its bumplimit, please create a new one'.format(self.thread)) |
|
48 | 49 | if self.source_type == SOURCE_TYPE_RSS: |
@@ -56,11 +57,11 b' class ThreadSource(models.Model):' | |||
|
56 | 57 | else: |
|
57 | 58 | if timestamp > last_timestamp: |
|
58 | 59 | last_timestamp = timestamp |
|
59 | ||
|
60 | 60 | if timestamp > start_timestamp: |
|
61 | 61 | Post.objects.create_post(title=title, text=item.description, thread=self.thread, file_urls=[item.link]) |
|
62 | 62 | logger.info('Fetched item {} from {} into thread {}'.format( |
|
63 | 63 | title, self.name, self.thread)) |
|
64 | logger.info('New timestamp is {}'.format(last_timestamp)) | |
|
64 | 65 | self.timestamp = last_timestamp |
|
65 | 66 | self.save(update_fields=['timestamp']) |
|
66 | 67 |
General Comments 0
You need to be logged in to leave comments.
Login now