def __init__(self, year, name=None): unix_this_year = unix_date_from_utc(year, 1, 1) unix_this_year_end = unix_date_from_utc(year, 12, 31) self.fql = ''' SELECT post_id, actor_id, created_time, comments, likes, message FROM stream WHERE source_id=me() AND message!='' AND filter_key='others' AND created_time > %s AND created_time < %s LIMIT 500 ''' % (unix_this_year, unix_this_year_end) super(OwnerPostsFromYearTask, self).__init__(name)
from __future__ import division, print_function, unicode_literals import datetime from pytz import utc from voomza.apps.core.utils import unix_date_from_utc # THIS_YEAR = datetime.datetime(2012, 1, 1, tzinfo=utc) # THIS_YEAR_END = datetime.datetime(2012, 12, 31, tzinfo=utc) UNIX_THIS_YEAR = unix_date_from_utc(2012, 1, 1) UNIX_THIS_YEAR_END = unix_date_from_utc(2012, 12, 31) GROUP_PHOTO_CUTOFF = datetime.datetime(2012 - 2, 1, 1, tzinfo=utc) #PHOTO_WIDTH_DESIRED = 900 PHOTO_WIDTH_DESIRED = 565 TOP_FRIEND_POINTS_FOR_PHOTO_COMMENT = 2 TOP_FRIEND_POINTS_FOR_POST = 3 TOP_FRIEND_POINTS_FOR_PHOTO_OF_2 = 5 TOP_FRIEND_POINTS_FOR_PHOTO_OF_3 = 3 TOP_FRIEND_POINTS_FOR_PHOTO_OF_4 = 1 TOP_PHOTO_POINTS_FOR_TOP_FRIENDS = 3 TOP_PHOTO_POINTS_FOR_COMMENT = 3 TOP_PHOTO_POINTS_FOR_LIKE = 2 GROUP_PHOTO_POINTS_FOR_TOP_FRIENDS = 3 GROUP_PHOTO_POINTS_FOR_COMMENT = 3 GROUP_PHOTO_POINTS_FOR_LIKE = 2 ALBUM_POINTS_FOR_TOP_PHOTO = 2 ALBUM_POINTS_FOR_OTHER_PHOTO = 1