소스 검색

Update timestamps of generated feeds as well

Artemy Tregubenko 10 년 전
부모
커밋
568c346684
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      touch/__init__.py

+ 5 - 0
touch/__init__.py

@@ -27,5 +27,10 @@ def touch_file(path, context):
         set_file_utime(path, max(x.date for x in dates))
 
 
+def touch_feed(path, context, feed):
+    set_file_utime(path, max(x['pubdate'] for x in feed.items))
+
+
 def register():
     signals.content_written.connect(touch_file)
+    signals.feed_written.connect(touch_feed)