-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flight hard stop #772
Flight hard stop #772
Conversation
Some advertisers running a time sensitive event want a hard stop date for their flight.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple enough, but not 100% sure we want to be adjusting data on the flight.
adserver/tasks.py
Outdated
if flight.clicks_remaining() <= 0 and flight.views_remaining() <= 0: | ||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could probably use a comment. Are we skipping this because it finished properly?
if flight.clicks_remaining() <= 0 and flight.views_remaining() <= 0: | |
continue | |
# Don't execute for flights that properly finished | |
if flight.clicks_remaining() <= 0 and flight.views_remaining() <= 0: | |
continue |
After discussion, I'm thinking about having a "hard stop" boolean and use the |
Co-authored-by: Eric Holscher <25510+ericholscher@users.noreply.github.com>
I switched |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this approach, seems cleaner and doesn't lose data 👍
Some advertisers running a time sensitive event want a hard stop date for their flight.
Right now, the hard stop can only be set in the Django admin but it is displayed to the user when set. The hard stop lowers the impressions/clicks so the flight is completely fulfilled. Then the normal flight wrapup email is sent at the normal time.