<commit_before>#!/bin/bash

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Updates product release and other data in the docker environment.
#
# Usage: docker/run_update_data.sh

set -eo pipefail

HOSTUSER=$(id -u):$(id -g)

DC="$(which docker-compose)"

# Fetch release data (verbosely)
${DC} run app shell ./socorro-cmd crontabber --reset-job=archivescraper
${DC} run app shell ./socorro-cmd crontabber --job=archivescraper \
    --crontabber.class-ArchiveScraperCronApp.verbose

# Create ES indexes for the next few weeks
${DC} run app shell ./socorro-cmd create_recent_indices<commit_msg>Add missing versions to "make updatedata"<commit_after>#!/bin/bash

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Updates product release and other data in the docker environment.
#
# Usage: docker/run_update_data.sh

set -eo pipefail

HOSTUSER=$(id -u):$(id -g)

DC="$(which docker-compose)"

# Fetch release data (verbosely)
${DC} run app shell ./socorro-cmd crontabber --reset-job=archivescraper
${DC} run app shell ./socorro-cmd crontabber --job=archivescraper \
    --crontabber.class-ArchiveScraperCronApp.verbose

# Insert data that's no longer on archive.mozilla.org
${DC} run app shell python ./scripts/insert_missing_versions.py

# Create ES indexes for the next few weeks
${DC} run app shell ./socorro-cmd create_recent_indices
{'fraction_non_alphanumeric': 0.11029859841560025, 'fraction_numerical': 0.004875076173065204, 'mean_word_length': 4.1152647975077885, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3482991', 'n_tokens_mistral': 566, 'n_tokens_neox': 525, 'n_words': 193}