mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 12:33:40 +00:00
fetch-contributor-data: Fix running in production.
The previous logic attempted to check for a venv, rather than putting itself into the virtualenv automatically.
This commit is contained in:
@@ -4,25 +4,22 @@ Fetch contributors data from Github using their API, convert it to structured
|
|||||||
JSON data for the /team page contributors section.
|
JSON data for the /team page contributors section.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# check for the venv
|
import os
|
||||||
from lib import sanity_check
|
import sys
|
||||||
sanity_check.check_venv(__file__)
|
|
||||||
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
|
||||||
|
from scripts.lib.setup_path import setup_path
|
||||||
|
setup_path()
|
||||||
|
|
||||||
from typing import Any, Dict, List, Optional, Union
|
from typing import Any, Dict, List, Optional, Union
|
||||||
from typing_extensions import TypedDict
|
from typing_extensions import TypedDict
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import argparse
|
import argparse
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from random import randrange
|
from random import randrange
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
|
|
||||||
from scripts.lib.setup_path import setup_path
|
|
||||||
setup_path()
|
|
||||||
|
|
||||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'zproject.settings'
|
os.environ['DJANGO_SETTINGS_MODULE'] = 'zproject.settings'
|
||||||
import django
|
import django
|
||||||
django.setup()
|
django.setup()
|
||||||
|
|||||||
Reference in New Issue
Block a user