Add scan free trial user worker
relate https://jihulab.com/gitlab-cn/gitlab/-/issues/3701+
depend on
- Add free-trial user mailer (!2120 - merged)
- Block free trial user (!2122 - merged)
- Patch subscription portal client for purchase list (!2123 - merged)
What does this MR do and why?
add scan free trial user worker
- run at
0 20 * * *
which is UTC time, run everyday 4 in early morning - business scenario in #3701 description
- high level logic explanation
- build paid_user_hash from all namespaces of paid plan + paid ci + paid storage
- build expired_user_hash from all namespaces of expired plan + expired storage (ci doesn't expire)
- loop all human but not forbidden user, find out
free trial start date
- do
block
orsend free trial email
logic if need
由 TianLu 编辑于