This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log () { | |
current_date=$(date +"%Y-%m-%d %H:%M:%S,%N") | |
ns=${current_date:20:9} | |
# turn ns to ms using rounding | |
rounded_millis=$(printf "%.0f" $(echo "scale=6;$ns/1000000" | bc)) | |
msg=$1 | |
echo "${current_date:0:20}${rounded_millis} - ${msg}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
from mycroft_bus_client import MessageBusClient, Message | |
from kodijson import Kodi | |
from dotenv import load_dotenv | |
import os | |
import time | |
import threading | |
import re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
from mycroft_bus_client import MessageBusClient, Message | |
from kodijson import Kodi | |
from dotenv import load_dotenv | |
import os | |
load_dotenv() | |
kodi_username = os.getenv('KODI_USERNAME') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all of a sudden, at 2:00 in the night, I started getting these errors: | |
[2014-05-09 13:35:43,032][DEBUG][action.bulk ] [Bushmaster] [.marvel-2014.05.09][0] failed to execute bulk item (index) index {[.marvel-2014.05.09][index_stats][zToUMDvuSxS0wVAPKB236A], source[{"@timestamp":"2014-05-09T11:35:43.024Z","cluster_name":"elasticsearch","index":".marvel-2014.05.09","_source_node":{"id":"62b9fpf0TTC8D3VH8NWgFg","name":"Bushmaster","transport_address":"inet[79.99.186.108/79.99.186.108:9300]","ip":"79.99.186.108","host":"79.99.186.108","ip_port":"79.99.186.108:9300","master_node":true,"data_node":true,"master":true},"primaries":{"docs":{"count":3368,"deleted":0},"store":{"size_in_bytes":16965332,"throttle_time_in_millis":73833},"indexing":{"index_total":3369,"index_time_in_millis":7681,"index_current":0,"delete_total":0,"delete_time_in_millis":0,"delete_current":0},"get":{"total":0,"time_in_millis":0,"exists_total":0,"exists_time_in_millis":0,"missing_total":0,"missing_time_in_millis":0,"current":0}," |