<commit_before>import datetime
from main.resources.resource_util import update_sequence_value, find_resource


# add a message to the worker log
def worker_log(worker_name, message):
    print(worker_name + ': ' + message)
    name = '/system/worker/log'
    update_sequence_value(find_resource(name), name, datetime.datetime.utcnow(), worker_name + ': ' + message)<commit_msg>convert log messages to plain strings<commit_after>import datetime
from main.resources.resource_util import update_sequence_value, find_resource


# add a message to the worker log
def worker_log(worker_name, message):
    print(worker_name + ': ' + message)
    name = '/system/worker/log'
    update_sequence_value(find_resource(name), name, datetime.datetime.utcnow(), str(worker_name + ': ' + message))  # convert unicode to plain string
{'fraction_non_alphanumeric': 0.10146699266503667, 'fraction_numerical': 0.0, 'mean_word_length': 5.552, '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': '4852106', 'n_tokens_mistral': 238, 'n_tokens_neox': 229, 'n_words': 61}