diff --git a/apps/rss_feeds/models.py b/apps/rss_feeds/models.py index f9bf31fa9..e910c8c63 100644 --- a/apps/rss_feeds/models.py +++ b/apps/rss_feeds/models.py @@ -1236,13 +1236,17 @@ class Feed(models.Model): self.save() def queue_pushed_feed_xml(self, xml): - logging.debug(' ---> [%-30s] [%s] ~FBQueuing pushed stories...' % (unicode(self)[:30], self.pk)) - - self.queued_date = datetime.datetime.utcnow() - self.set_next_scheduled_update() - - PushFeeds.apply_async(args=(self.pk, xml), queue='push_feeds') + r = redis.Redis(connection_pool=settings.REDIS_POOL) + queue_size = r.llen("push_feeds") + if queue_size > 1000: + self.schedule_feed_fetch_immediately() + else: + logging.debug(' ---> [%-30s] [%s] ~FBQueuing pushed stories...' % (unicode(self)[:30], self.pk)) + self.queued_date = datetime.datetime.utcnow() + self.set_next_scheduled_update() + PushFeeds.apply_async(args=(self.pk, xml), queue='push_feeds') + # def calculate_collocations_story_content(self, # collocation_measures=TrigramAssocMeasures, # collocation_finder=TrigramCollocationFinder): diff --git a/fabfile.py b/fabfile.py index b9062611e..ef9467295 100644 --- a/fabfile.py +++ b/fabfile.py @@ -790,6 +790,9 @@ def setup_task_motd(): def enable_celery_supervisor(): put('config/supervisor_celeryd.conf', '/etc/supervisor/conf.d/celeryd.conf', use_sudo=True) + sudo('supervisorctl reread') + sudo('supervisorctl update') + def copy_task_settings(): with settings(warn_only=True): diff --git a/media/ios/Classes/TrainerViewController.m b/media/ios/Classes/TrainerViewController.m index 7adab5276..4b91c7fad 100644 --- a/media/ios/Classes/TrainerViewController.m +++ b/media/ios/Classes/TrainerViewController.m @@ -31,8 +31,18 @@ self.appDelegate = [NewsBlurAppDelegate sharedAppDelegate]; navBar.tintColor = UIColorFromRGB(0x183353); + [self hideGradientBackground:webView]; +} +- (void) hideGradientBackground:(UIView*)theView +{ + for (UIView * subview in theView.subviews) + { + if ([subview isKindOfClass:[UIImageView class]]) + subview.hidden = YES; + + [self hideGradientBackground:subview]; + } } - - (void)viewWillAppear:(BOOL)animated { [[UIMenuController sharedMenuController] setMenuItems:[NSArray arrayWithObjects: @@ -46,6 +56,7 @@ NSString *path = [[NSBundle mainBundle] bundlePath]; NSURL *baseURL = [NSURL fileURLWithPath:path]; + [self.webView loadHTMLString:[self makeTrainerSections] baseURL:baseURL]; } diff --git a/media/ios/NewsBlur.xcodeproj/xcuserdata/sclay.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/media/ios/NewsBlur.xcodeproj/xcuserdata/sclay.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist index f2fe8e660..617c10173 100644 --- a/media/ios/NewsBlur.xcodeproj/xcuserdata/sclay.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist +++ b/media/ios/NewsBlur.xcodeproj/xcuserdata/sclay.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist @@ -17,15 +17,15 @@ landmarkType = "5"> diff --git a/media/ios/Resources-iPad/Classes/TrainerViewController~ipad.xib b/media/ios/Resources-iPad/Classes/TrainerViewController~ipad.xib index 239f497f6..4028c7889 100644 --- a/media/ios/Resources-iPad/Classes/TrainerViewController~ipad.xib +++ b/media/ios/Resources-iPad/Classes/TrainerViewController~ipad.xib @@ -67,19 +67,32 @@ {{0, 44}, {540, 556}} - _NS:9 - - 10 - - 549453824 - {256, 256} - - - - - - TU0AKgAEAAh1eIH/cHJ5/3Bzff9vcXX/bnB3/3Byef9vcXX/bG51/2xudf9ucHf/cHN9/2dqdP9ucXv/ + + 3 + MCAwAA + + NO + IBIPadFramework + 1 + YES + + + {{0, 20}, {540, 600}} + + + + + 10 + + 549453824 + {256, 256} + + + + + + TU0AKgAEAAh1eIH/cHJ5/3Bzff9vcXX/bnB3/3Byef9vcXX/bG51/2xudf9ucHf/cHN9/2dqdP9ucXv/ cHJ5/3Bzff9qbHP/b3F1/3N1fP9sbnX/am13/2ptd/9sbnX/am13/3l7gf91d33/bG95/2xudf9sb3n/ bG95/2dqdP9qbXf/c3V8/3Bzff93eoP/bG51/3Bzff9sbnX/dXd9/2dqdP9qbHP/bG51/2psc/9sb3n/ am13/2ptd/9sb3n/bG51/3V3ff97fYP/YmVu/25xe/9sb3n/c3Z//2psc/9zdXz/cHN9/2dqcf9qbHP/ @@ -4452,32 +4465,13 @@ cHN9/2xvef9wc33/AA0BAAADAAAAAQEAAAABAQADAAAAAQEAAAABAgADAAAABAAEAKoBAwADAAAAAQAB AAABBgADAAAAAQACAAABEQAEAAAAAgAEALIBEgADAAAAAQABAAABFQADAAAAAQAEAAABFgADAAAAAQCA AAABFwAEAAAAAgAEALoBHAADAAAAAQABAAABUgADAAAAAQABAAABUwADAAAABAAEAMIAAAAAAAgACAAI AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE - - - - - - 3 - MCAwAA + - - scrollViewTexturedBackgroundColor - - IBIPadFramework - 1 - YES - - - {{0, 20}, {540, 600}} - - - - - 3 - MQA - - 2 + + + + scrollViewTexturedBackgroundColor 2 diff --git a/media/ios/Resources-iPhone/TrainerViewController.xib b/media/ios/Resources-iPhone/TrainerViewController.xib index 36d2cf7c9..d06d84241 100644 --- a/media/ios/Resources-iPhone/TrainerViewController.xib +++ b/media/ios/Resources-iPhone/TrainerViewController.xib @@ -38,25 +38,62 @@ 274 - + 274 {{0, 44}, {320, 460}} - _NS:9 - - 10 - - 549453824 - {256, 256} - - - - - - TU0AKgAEAAh1eIH/cHJ5/3Bzff9vcXX/bnB3/3Byef9vcXX/bG51/2xudf9ucHf/cHN9/2dqdP9ucXv/ + + 3 + MCAwAA + + NO + IBCocoaTouchFramework + 1 + YES + + + + 290 + {320, 44} + + + + _NS:240 + IBCocoaTouchFramework + + + + + + Done Training + IBCocoaTouchFramework + 50 + 2 + + + IBCocoaTouchFramework + + + + + {{0, 20}, {320, 504}} + + + + + 10 + + 549453824 + {256, 256} + + + + + + TU0AKgAEAAh1eIH/cHJ5/3Bzff9vcXX/bnB3/3Byef9vcXX/bG51/2xudf9ucHf/cHN9/2dqdP9ucXv/ cHJ5/3Bzff9qbHP/b3F1/3N1fP9sbnX/am13/2ptd/9sbnX/am13/3l7gf91d33/bG95/2xudf9sb3n/ bG95/2dqdP9qbXf/c3V8/3Bzff93eoP/bG51/3Bzff9sbnX/dXd9/2dqdP9qbHP/bG51/2psc/9sb3n/ am13/2ptd/9sb3n/bG51/3V3ff97fYP/YmVu/25xe/9sb3n/c3Z//2psc/9zdXz/cHN9/2dqcf9qbHP/ @@ -4429,56 +4466,13 @@ cHN9/2xvef9wc33/AA0BAAADAAAAAQEAAAABAQADAAAAAQEAAAABAgADAAAABAAEAKoBAwADAAAAAQAB AAABBgADAAAAAQACAAABEQAEAAAAAgAEALIBEgADAAAAAQABAAABFQADAAAAAQAEAAABFgADAAAAAQCA AAABFwAEAAAAAgAEALoBHAADAAAAAQABAAABUgADAAAAAQABAAABUwADAAAABAAEAMIAAAAAAAgACAAI AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE - - - - - - 3 - MCAwAA + - - scrollViewTexturedBackgroundColor - - IBCocoaTouchFramework - 1 - YES - - - - 290 - {320, 44} - - - - _NS:240 - IBCocoaTouchFramework - - - - - - Done Training - IBCocoaTouchFramework - 50 - 2 - - - IBCocoaTouchFramework - + + - - {{0, 20}, {320, 504}} - - - - - 3 - MQA - - 2 - + scrollViewTexturedBackgroundColor @@ -4494,7 +4488,7 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE webView - + 13 @@ -4510,14 +4504,14 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE navBar - + 20 delegate - + 12 @@ -4525,7 +4519,7 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE doCloseDialog: - + 19 @@ -4543,8 +4537,8 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE 1 - - + + @@ -4561,30 +4555,30 @@ AAgAAAAIAAIACAACAAAAAgAAAAEAAQABAAE 3 - + 15 - + - + 16 - + - + - + 17 - - + + diff --git a/media/ios/static/trainer.css b/media/ios/static/trainer.css index e8d7e7eb5..e28ce60c5 100644 --- a/media/ios/static/trainer.css +++ b/media/ios/static/trainer.css @@ -2,6 +2,7 @@ margin: 0; padding: 0; font-family: "Lucida Grande", Helvetica; + background-color: transparent; } .NB-trainer { @@ -9,7 +10,6 @@ } .NB-trainer-section { - overflow: hidden; font-size: 13px; -webkit-text-size-adjust: none; @@ -18,6 +18,15 @@ -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } +.NB-trainer-section-inner { + margin: 16px 0 0; + overflow: hidden; + box-shadow: 0 0 8px rgba(0, 0, 0, .6); +} +.NB-trainer-publisher .NB-trainer-section-inner { + margin-bottom: 16px; +} + .NB-trainer-section-title { font-size: 15px; text-transform: uppercase; @@ -41,7 +50,6 @@ overflow: hidden; background-color: #F0F0FF; border-bottom: 1px solid #D0D0D9; - margin: 0 0 16px; } .NB-trainer-title .NB-title-trainer {