-
-
Notifications
You must be signed in to change notification settings - Fork 404
Open
Description
After fix (by @Brikaa) of counter reset because of the race condition (#66) we need to create console command which will re-calculate correct counter values. It should count lines in storage/{username}-views
file and store them to storage/{username}-views-count
.
Something like:
cat storage/{username}-views | wc -l | tr -d ' ' > storage/{username}-views-count
But we should iterate thru all the usernames in the storage directory. There are many counter files, so ls -la
is hanging for a long time.
One more thing to ensure: we need to make -1
from wc -l
, because of the empty line at the end of file.
Metadata
Metadata
Assignees
Labels
No labels