Skip to content

Conversation

@ihsaan-ullah
Copy link
Collaborator

@ihsaan-ullah ihsaan-ullah commented Dec 10, 2024

@ mention of reviewers

@Didayolo

A brief description of the purpose of the changes contained in this PR.

  • Home page counters are now dynamic and are read from home_page_counters.json file
  • latest counts are updated every 24 hours

Issues this PR resolves

A checklist for hand testing

  • after deployment check that the script runs every 24 hours and the counters and time are updated in the json file and on the wbesite

Manual intervention

Manually starting the counting task:

docker compose exec django ./manage.py shell_plus
from analytics.tasks import update_home_page_counters
eager_results = update_home_page_counters.apply_async()

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

@Didayolo Didayolo self-assigned this Dec 10, 2024
@Didayolo
Copy link
Member

@ihsaan-ullah Just to confirm, the script is launched automatically by the docker-compose up -d? There is no manual configuration needed?

@ihsaan-ullah
Copy link
Collaborator Author

@ihsaan-ullah Just to confirm, the script is launched automatically by the docker-compose up -d? There is no manual configuration needed?

You are right, the updates should run automatically

@Didayolo
Copy link
Member

home_page_counters.json should have 0 values by default.

Something like:

{
    "public_competitions": 0,
    "users": 0,
    "submissions": 0,
    "last_updated": "2000-01-01T00:00:00.000000+00:00"
}

@Didayolo Didayolo merged commit 18cc11c into develop Dec 12, 2024
1 check passed
@Didayolo Didayolo deleted the home_page_numbers branch December 12, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants