path: root/
AgeCommit message (Collapse)AuthorFilesLines
2014-10-19Remove usage of templates for RSS feedsDan McGee1-2/+6
Signed-off-by: Dan McGee <>
2014-10-19Simplify last modified and etags processing for feedsDan McGee1-5/+9
We had this elaborate system set up with caching and invalidation, which is overkill since we cache the result of the view anyway. Just hit the database when needed to find the last change to the respective model class and be done with it. Signed-off-by: Dan McGee <>
2014-01-11Speed up feeds generation by batching writesDan McGee1-3/+32
The XML generation underlying our package feeds was doing 1600+ calls to the write() method on the outfile. For some reason, the Python standard library insists on calling flush() after every write, which really makes performance take a nosedive. Wrap the write calls and do them in batches to remove some of the overhead and make feed generation a bit snappier. Signed-off-by: Dan McGee <>
2014-01-09Remove remaining references to release file_size fieldDan McGee1-1/+4
Signed-off-by: Dan McGee <>
2013-07-13Move simple feeds templates directly into feed classesDan McGee1-2/+6
No need to call out to the template engine to format... nothing at all. Just fetch the attribute directly and save the render step. Signed-off-by: Dan McGee <>
2013-01-19Add basic release list and details viewsDan McGee1-4/+1
Signed-off-by: Dan McGee <>
2013-01-19Add more metadata to releng Release modelDan McGee1-1/+3
Add a file_size field which we will use in the RSS feed, and also add a field for future storage of the torrent data itself. Signed-off-by: Dan McGee <>
2013-01-19Initial cut of a Releases RSS feedDan McGee1-0/+43
This is our first use of enclosures on the site as well. Signed-off-by: Dan McGee <>
2013-01-13Add __name__ attribute to class-based Feeds viewsrelease_2013-01-13Dan McGee1-0/+4
This should hopefully allow these views to not be labeled as '_wrapped_view' in performance monitoring output. Signed-off-by: Dan McGee <>
2012-11-06Remove explicit timezone handling from feedsDan McGee1-3/+2
Signed-off-by: Dan McGee <>
2012-11-06Make guid feeds helper a @staticfunctionDan McGee1-9/+12
Signed-off-by: Dan McGee <>
2012-07-31feeds: add all arches for repo feedDan McGee1-1/+3
If you wanted to see all updates regardless of architecture for [testing] before, there wasn't really a way to do so. Add one. Signed-off-by: Dan McGee <>
2012-07-31Update several bits and pieces for staging packagesDan McGee1-2/+5
This will prevent [staging] packages from cluttering normal user's view on the website, but allow us to still import everything from this repository for developer use. Signed-off-by: Dan McGee <>
2012-05-20Ensure we use last_modified date from News in headersDan McGee1-2/+2
We were actually using the postdate attribute rather than last_modified, which means any News objects that get edited would not trigger an update of the feed. Signed-off-by: Dan McGee <>
2012-03-23Use python hashlib directlyDan McGee1-3/+3
Django hashcompat is now deprecated. Signed-off-by: Dan McGee <>
2011-06-15Refactor common select_related into manager methodDan McGee1-1/+1
For a Package object query, we almost always did .select_related('arch', 'repo). Refactor this into the manager as a 'normal()' method so we can avoid sprinkling the same logic everywhere. Signed-off-by: Dan McGee <>
2011-04-07Consolidate caching black magicDan McGee1-39/+5
Get the stuff used to retrieve and refresh the latest date values all in the same place, and make it a bit more beautiful by refactoring it all into a common set of methods. Signed-off-by: Dan McGee <>
2011-04-07Use UTC datetime objects everywhereDan McGee1-18/+4
Rather than the twisted mix of local times and UTC times we currently have. Signed-off-by: Dan McGee <>
2011-04-07Add a horrible hack to allow feed guid value to not be a permalinkDan McGee1-0/+23
Django, you make the simplest things so damn hard sometimes. Signed-off-by: Dan McGee <>
2011-04-07Ensure feed GUIDs are unchanging and uniqueDan McGee1-0/+14
Implement 'tag:' style URIs for the GUID field on our RSS feeds. This ensures new package updates show up as new, and we aren't jumping back and forth between generated GUIDs having 'http://' and 'https://' prefixes. Much of the work here is to attempt to keep old news GUIDs constant so we don't once again make everything show up as new in newsreaders. Signed-off-by: Dan McGee <>
2011-02-15Use date from model in news feedDan McGee1-4/+5
Now that this a datetime and not just a date, we can use it directly. Signed-off-by: Dan McGee <>
2010-11-27Fix feeds for case-sensitive databasesDan McGee1-1/+1
This worked in MySQL because of it's case-insensitive matching, but does not work in other databases unless we coerce the value. Signed-off-by: Dan McGee <>
2010-10-13Connect post_save signals where they will always be triggeredDan McGee1-23/+2
We need to do this in the files, otherwise the post_save signal might not be connected right away on launch of the application. Move them over there, add a dispatch_uid so it only gets hooked up once, and do some other function moving around so we don't have circular imports. Signed-off-by: Dan McGee <>
2010-10-08Fix potential race conditions in cachingDan McGee1-14/+14
Use a 'set to None' sentinel to indicate data updates are in progress and we need to hold off a bit on caching a new value. This logic is gleamed from the "Scaling Django" slides presented by Mike Malone and available freely on SlideShare. Signed-off-by: Dan McGee <>
2010-10-07Ensure last modified times use UTCDan McGee1-0/+16
We were cheating before and using non-UTC times; adjust the values we get back from the database as appropriate so our times are not bogus. Signed-off-by: Dan McGee <>
2010-10-07Store package feed last modified date in memcachedDan McGee1-9/+28
Just like what we did for news items, we can do the same for packages. Signed-off-by: Dan McGee <>
2010-10-07Store latest news date in memcachedDan McGee1-2/+23
This saves two database queries each request, meaning no database hits at all if we are just going to return a 304 response. It also requires adding a post_save signal to ensure our cache is updated with the correct latest news date upon saving a news item. Signed-off-by: Dan McGee <>
2010-10-07Factor out common last modified code for news feedDan McGee1-7/+12
This will set up retrieving this value from memcached as well as some other changes to come. Signed-off-by: Dan McGee <>
2010-09-14Improve request handling for feeds that haven't changedDan McGee1-0/+37
By using the condition decorator (in a slightly odd way because these are class-based views), we can cut down a lot on the response time for returning 304 status code for feeds that haven't changed. The decorator means we no longer have to completely render the view to see if we can return a 304 status code. Signed-off-by: Dan McGee <>
2010-09-08Use arch.agnostic flag everywhereDan McGee1-2/+2
Signed-off-by: Dan McGee <>
2010-09-08Move news model to an appropriate placeDan McGee1-1/+3
Never would have guessed it should actually be in news/ Signed-off-by: Dan McGee <>
2010-08-28PyLint suggested cleanupsDan McGee1-2/+1
We had a bunch of extra imports, non-conventional variable names, spacing issues, etc. that were relatively low-hanging fruit to clean up. Fix them and make the code a bit cleaner in the process. Signed-off-by: Dan McGee <>
2010-08-27Remove an unnecessary iexactDan McGee1-1/+1
Signed-off-by: Dan McGee <>
2010-06-08Update feeds to new 1.2 frameworkDan McGee1-11/+11
Feeds are now views-based and don't need the dictionary anymore. get_object() now takes named arguments as well making it a bit more understandable when reading the code. Signed-off-by: Dan McGee <>
2010-05-04feeds: move link from method to attributeDan McGee1-3/+2
Signed-off-by: Dan McGee <>
2010-02-10Remove archweb prefix from all importsDan McGee1-1/+1
Unnecessary, and lets us standardize on not using it everywhere. Signed-off-by: Dan McGee <>
2010-02-04feeds: add per arch, per repo feed abilityDan McGee1-9/+51
Make the feed framework a lot more flexible and give the possibility to have a feed for each architecture. You can drill down even more than also get a feed for a particular repo; some might find this helpful for something like tracking [testing]. Implements FS#12939. I also bumped up the number of items available in each of these feeds; since it is full of a bunch of small items it might be more helpful to have more available and it should also prevent fewer ones from being missed. The UI isn't exactly spectacular, but I figured some sort of page is better than none listing all the various feeds you can pull from. Signed-off-by: Dan McGee <>
2010-01-31Make the feed titles more descriptiveDan McGee1-5/+4
FS#16752. Signed-off-by: Dan McGee <>
2010-01-31Use select_related() to make a few more places more performantDan McGee1-2/+2
Especially when looking at packages, we always want the arch and repo. Another big hunk of changes deals with the very inefficient signoffs code. Signed-off-by: Dan McGee <>
2009-11-09added feeds from archweb_pubIsmael Carnales1-0/+36
2007-12-30Removed feeds from devsiteeliott1-35/+0
2007-12-29Massive retab fest.eliott1-0/+2
Also added vim command comment to the end of files.
2007-12-22renamed importseliott1-2/+2
2007-11-17Stupid change.eliott1-1/+1
2007-11-06Fix bug FS#8417eliott1-0/+4
2007-11-03Initial import for public release...eliott1-0/+29
Special Note Prior to git import, approx 90% of the code was done by Judd Vinet. Thanks Judd!