Course disappear for learner after some time? From Feature Course

The course disapper for the learner after 10 to 15 days I think so but when I reiindex that course from CMS than it is now visible on the learner side. How to make it reindex automatically so I don’t need to reindex manually again and again?

======================================================================
For more detail logs are also attached…

May 3 07:38:34 ip-172-31-0-255 [service_variant=lms][elasticsearch][env:sandbox] INFO [ip-172-31-0-255 29811] [base.py:63] - HEAD http://localhost:9200/courseware_index [status:200 request:0.001s]
May 3 07:38:34 ip-172-31-0-255 [service_variant=lms][root][env:sandbox] INFO [ip-172-31-0-255 29811] [api.py:100] - searcher
May 3 07:38:34 ip-172-31-0-255 [service_variant=lms][root][env:sandbox] INFO [ip-172-31-0-255 29811] [api.py:101] - <search.elastic.ElasticSearchEngine object at 0x7fae582373d0>
May 3 07:38:34 ip-172-31-0-255 [service_variant=lms][root][env:sandbox] INFO [ip-172-31-0-255 29811] [api.py:116] - results
May 3 07:38:34 ip-172-31-0-255 [service_variant=lms][root][env:sandbox] INFO [ip-172-31-0-255 29811] [api.py:117] - {‘facets’: {u’org’: {‘total’: 0, ‘terms’: {}, ‘other’: 0}, u’modes’: {‘total’: 0, ‘terms’: {}, ‘other’: 0}, u’language’: {‘total’: 0, ‘terms’: {}, ‘other’: 0}}, ‘total’: 0, ‘max_score’: None, ‘took’: 1, ‘results’: }
May 3 07:38:34 ip-172-31-0-255 [service_variant=lms][root][env:sandbox] INFO [ip-172-31-0-255 29764] [api.py:100] - searcher
May 3 07:38:34 ip-172-31-0-255 [service_variant=lms][root][env:sandbox] INFO [ip-172-31-0-255 29764] [api.py:101] - <search.elastic.ElasticSearchEngine object at 0x7fae57c1bd10>
May 3 07:38:34 ip-172-31-0-255 [service_variant=lms][root][env:sandbox] INFO [ip-172-31-0-255 29764] [api.py:116] - results
May 3 07:38:34 ip-172-31-0-255 [service_variant=lms][root][env:sandbox] INFO [ip-172-31-0-255 29764] [api.py:117] - {‘facets’: {u’org’: {‘total’: 0, ‘terms’: {}, ‘other’: 0}, u’modes’: {‘total’: 0, ‘terms’: {}, ‘other’: 0}, u’language’: {‘total’: 0, ‘terms’: {}, ‘other’: 0}}, ‘total’: 0, ‘max_score’: None, ‘took’: 1, ‘results’: }

================================ AFTER REINDEX ======================

In the result it was showing data of the course in the JSON

@Ayman_Shaikh, there is an Ansible variable named EDXAPP_ADDITIONAL_CRON_JOBS which can be used to specify additional custom cron jobs to set up on the Open edX instance. Here is an example of how to specify the values.

EDXAPP_ADDITIONAL_CRON_JOBS:
  - name: "discovery: hourly course metadata refresh"
    user: "root"
    job: "sudo -u discovery bash -c 'source {{ discovery_home }}/discovery_env; {{ COMMON_BIN_DIR }}/manage.discovery refresh_course_metadata'"
    hour: "*"
    minute: "7"
    day: "*"
1 Like