Conversation
This needs to be restored. I am not going to sit and edit the |
|
Also, how did you test this? Can you please update "Testing done"? |
I misunderstood the _common.py file and I didn't realize you could pass in the arguments of the function to execute with the |
|
Testing was done with the private database dump "openpath-stage-snapshot-investigate-demographics". Since this dump is over a year old, running the script with a threshold of one day marks all the users as inactive Setting the threshold to 500 days gives us some active users Let's remove these users Now there are no more inactive users with a threshold of 500 days |
shankari
left a comment
There was a problem hiding this comment.
Since we need to make the changes to read from the profile anyway, I think it would also be helpful to have the script output the results as a csv, one line per deployment. That would allow us to save the results and generate some pretty pictures as needed later.
| print(f"PROD_LIST: {PROD_LIST}") | ||
|
|
||
| def run_on_all_deployments(fn_to_run): | ||
| def run_on_all_deployments(fn_to_run, *args): |
|
@catarial I am merging this right now, but could you submit a separate PR that generates a csv of the results for better downstream analysis and tracking? |
Extension of #1010
A command line python script that identifies and optionally removes inactive users.
The amount of time that defines an active user can be specified with the
-tflag.The threshold time is compared to the timestamps of API calls and locations in the database.
I decided to pull out the part where it get's run on all deployments in favor of more configurability.