ervu-dashboard-etl/mappings/supportive_jobs/clearing_logs.hwf
2025-04-07 20:31:30 +03:00

83 lines
2.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<workflow>
<name>clearing_logs</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
<workflow_version/>
<created_user>-</created_user>
<created_date>2025/03/18 11:52:48.920</created_date>
<modified_user>-</modified_user>
<modified_date>2025/03/18 11:52:48.920</modified_date>
<parameters>
</parameters>
<actions>
<action>
<name>Start</name>
<description/>
<type>SPECIAL</type>
<attributes/>
<DayOfMonth>1</DayOfMonth>
<hour>12</hour>
<intervalMinutes>60</intervalMinutes>
<intervalSeconds>0</intervalSeconds>
<minutes>0</minutes>
<repeat>N</repeat>
<schedulerType>0</schedulerType>
<weekDay>1</weekDay>
<parallel>N</parallel>
<xloc>512</xloc>
<yloc>320</yloc>
<attributes_hac/>
</action>
<action>
<name>SQL, зачистка таблиц логов workflow_logs, channel_log</name>
<description/>
<type>SQL</type>
<attributes/>
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM public.channel_log
WHERE log_date &lt; DATE_TRUNC('day', CURRENT_DATE) - INTERVAL '4 days';
DELETE FROM public.workflow_logs
WHERE workflowstart &lt; DATE_TRUNC('day', CURRENT_DATE) - INTERVAL '4 days';</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
<xloc>816</xloc>
<yloc>320</yloc>
<attributes_hac/>
</action>
<action>
<name>Success</name>
<description/>
<type>SUCCESS</type>
<attributes/>
<parallel>N</parallel>
<xloc>1184</xloc>
<yloc>320</yloc>
<attributes_hac/>
</action>
</actions>
<hops>
<hop>
<from>Start</from>
<to>SQL, зачистка таблиц логов workflow_logs, channel_log</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>SQL, зачистка таблиц логов workflow_logs, channel_log</from>
<to>Success</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
</hops>
<notepads>
</notepads>
<attributes/>
</workflow>