VtΠ , d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlm Z m Z d dlmZ d dl mZ d dlmZ d dlmZ d dlmZ d dlmZ d d lmZ d ej dej de eef fd Zdede fdZdedefdZ dededdfdZ!dede fdZ"d Z#dS ) N)TupleDict)run_command)config)USER_NOTIFICATIONS_OFF_MARKER) setup_logging)user_should_be_notified)get_stats_notifier_parameters)dateutilargslogreturnc | j sdS t j }|dk r | j sdS | j t | j | j }nt | j }nR# t $ rE}d| t j d}| t | Y d}~nd}~ww xY wt j | }|dfS )zA Generic method to analyze options and call needed funcs )z Only JSON mode supported for nowr )z'Please, specify user id via --id optionr Nzerror: result timestamp) jsonosgetuidid notifyUsermanage_user_notificationsget_notifications_settings Exceptionr gm_datetime_to_unixtimestamperrorstrdumps)r r current_userr ejson_strs /builddir/build/BUILDROOT/lve-stats-4.3.2-1.el9.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/lib/cloudlinux_statsnotifier.pyexecuter$ s 9 6559;;Lq<< ?&.twHHFF/88F #mm!>@@ #a&& z&!!HQ;s 6A$ $ B3.;B..B3user_idc dt j d}t j }|dk s|n| }t j | j }t | |d<