Skip to content

Commit

Permalink
Merge pull request #7 from tmichela/fixOrder
Browse files Browse the repository at this point in the history
add and update tickets in chronological order
  • Loading branch information
tmichela authored Aug 14, 2021
2 parents ba4b0a4 + c55a541 commit 8b2b86d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions redmine_zulip/redmine.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def poll(self):
# get new issues
issues = self._get_feed()

for n, issue in enumerate(issues):
for n, issue in enumerate(reversed(issues)):
# publish and track
url = issue.id_

Expand Down Expand Up @@ -112,7 +112,7 @@ def track(self):
For each ticket tracked in our database, publish new messages and attachments
"""
log.info(f'tracking {len(self.issues)} issues')
Pool().map(self._track, [(n, issue) for n, issue in enumerate(self.issues)])
Pool().map(self._track, [(n, issue) for n, issue in enumerate(reversed(self.issues))])

# force reloading the list of topics to catch state changes
self.zulip_topics.cache_clear()
Expand Down

0 comments on commit 8b2b86d

Please sign in to comment.