Skip to content

synQup cleanup commands

cleanup commands allow you to cleanup different tables according to different conditions.

Commands

synqup:flowexecution:cleanup

Cleanup Flowexecution

by default the following tables aren`t cleaned: - flow_execution - flow_execution_job_dispatch_log_entry - flow_execution_progress_information

Thus these tables will run eventually full by reaching the max increment id value which is defined by int(11). This command exists exactly for this situation, to cleanup old data entries. Additionally it resets the increment value of the mentioned table by setting it to 1 and reinserts existing data.

Info

this command additionally checks for active flow executions and will only run if there are none!

Arguments and Options

--days=DAYS         | -d DAYS               Entries older than x days
--months=MONTHS     | -m MONTHS             Entries older than x months
--days=DAYS         | -d DAYS               Entries older than x years

Warning

this command needs to have atleast one argument provided with a value! If several arguments are provided, the command automatically notices it and wont execute

Additional functionality: resetting increment value

as already mentioned this method resets the increment value. If the max value of int(11) is reached, there cant be a new entry created. Since even after a cleanup of the tables the increment value is still at max, we need to reset this value to 1 so that new entries will be created with the id starting from 1. Old entries should be updated loguically too.

The command does the following to achieve this:

  • set the new auto_increment value to 1
  • create backups from the tables
  • truncate the tables
  • insert the data from the backups with the new ids

Info

this part will only be executed if older entries got removed