docbrown/app/workers
Jeremy Friesen 5ec47d99dc
Ensuring we don't track views of author or unpublished (#16143)
* Ensuring we don't track views of author or unpublished

Prior to this commit, I was surprised to learn that we:

1) Tracked an author's view of their article.
2) Tracked views of an unpublished article.

This came up from a Forem creator asking if they could reset the view
counter.  Or trigger the reset on publication.

I think a general business logic policy of don't track views for the
author and don't track views for unpublished articles is a reasonable
default.

Were we to pursue the clear views on publication, we'd need to consider
something that went from unpublished -> published -> unpublished ->
published.  Without a more explicit state machine, triggering a
busineiss logic behavior seems a bit unexpected.

In other words, I wrote an article.  There are 20 views when I realize
that I need to unpublished it.  I make the changes in the unpublished
state, and re-publish.  I'd assume that those 20 views would still be
"recorded" and counted towards my article's view counts.

* Adjusting condition structure

Prior to this commit, the `if` clause was rather far to the right.  This
helps make the if clause more pronounced.
2022-01-18 11:23:18 -05:00
..
articles Ensuring we don't track views of author or unpublished (#16143) 2022-01-18 11:23:18 -05:00
badge_achievements
broadcasts Add one day to the new users range (#16065) 2022-01-11 15:33:33 -06:00
comments
credits
discover Add Forem Discover registration worker and service (#14865) 2021-10-01 10:27:31 -04:00
emails Remove txn from with_statement_timeout block (#15088) 2021-10-15 14:53:35 -04:00
feeds Enforce Uniqueness for Feed Import and Push Notification Cleanup Workers (#14196) 2021-07-13 14:37:13 -04:00
follows Use the tag_list method, rather than the cached_tag_list attribute (#15638) 2021-12-03 14:47:42 -06:00
github_repos Only update GithubRepos once in RepoSyncWorker (#14175) 2021-07-09 09:58:20 -04:00
html_variants
listings
mentions [15-min-fix] Ensure mention worker delivers email (#14038) 2021-06-22 14:29:56 -04:00
metrics Login with Google (#15986) 2022-01-13 10:25:52 -06:00
moderator Admin productivity: Allow admins to unpublish all posts from a user (#15054) 2021-10-15 08:56:59 +02:00
notification_subscriptions Add Article post_commit when user_id changes with specs (#15132) 2021-10-25 10:53:21 +07:00
notifications Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
organizations Asynchronous organization delete (#13388) 2021-04-19 18:30:35 +03:00
pages
podcast_episodes
podcasts
push_notifications Update deliver worker conflict strategy (#15961) 2022-01-05 11:48:22 -06:00
rating_votes Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606) 2021-05-03 11:09:45 -04:00
reactions Extracting Article.featured scope (#15612) 2021-12-01 12:16:32 -05:00
slack/messengers
tags Suggest top tags when tag search is empty (#14817) 2021-09-30 09:41:20 +01:00
users Fix goal conversion field test typo (#15985) 2022-01-06 16:34:36 -05:00
bust_cache_base_worker.rb
bust_cache_path_worker.rb
capture_query_stats_worker.rb Add PGHero for more insights into the DB (#15073) 2021-11-05 12:25:02 -04:00
data_update_worker.rb
export_content_worker.rb
migrate_data_to_work_field_worker.rb Fix data update script for work field migration (#14207) 2021-07-13 13:20:21 +07:00