Gondee / SocialCurveManager

Social Curve Manger is a platform designed to enable monetization of social media platforms by means of 3rd party CPM advertising.
http://socialcurve.io
3 stars 1 forks source link

Background job that updates a stats table with daily payment data - Expires generated links #81

Closed Gondee closed 8 years ago

Gondee commented 8 years ago

I literally couldn't find a way around this. So background tasks it is!

Main Background task: Runs every night

  1. gets daily total clicked amount for each and every generated link. Stores them so we can query by day. We get 1 million link shortener queries per day, so this should be fine.
  2. For links that expire that day, it updates their column named paidclicks which is the total clicks they will be paid for. These links will no longer be checked nightly too

http://ruby-journal.com/how-to-integrate-sidekiq-with-activejob/

scojasp commented 8 years ago

If you save your work to a branch, I could try to contribute to this later

Gondee commented 8 years ago

i have it up in a branch. Im having issues calling it to perform_later atm

Gondee commented 8 years ago

Calling it a night, will be back on it tomorrow.

Gondee commented 8 years ago

Note: https://docs.c9.io/docs/setting-up-redis Note: http://bica.co/2015/03/08/using-active-job-with-sidekiq/ Starting SideKiq:bundle exec sidekiq -C ./config/sidekiq.yml Checking that its running: ps aux | grep sidekiq Start Redis: redis-server

Gondee commented 8 years ago

Got it working. @scojasp do you have time to meet up tomorrow for a couple hours?

scojasp commented 8 years ago

@Gondee Sure, after class nothing going on til 4 or so

Gondee commented 8 years ago

sweet, meet you after class