Preface
In this guide, we will go through the steps to perform a "Reset" action for an account. The "Reset" action deletes the tasks of the connector and brings it back to its initialized state.
Steps
If you have a version that is above 2.4.206:
Please use the RESET button, see in the following example:
If you have an earlier version:
-
From the UI, select the account, and from the right panel keep a note of the connector's id
-
On the host machine, in root user, paste the following function into bash:
function reset_connector(){ local IDS_RAW=$1 local IDS="\\'${IDS_RAW}\\'" docker exec --user postgres sk4postgres bash -c "psql -v ids=$IDS -v ep=$EP_NAME -d skyformationdb << EOF create view def_to_delete (id) as select id from task_definitions where executor in (:ids); create view tasks_to_delete as select id from task_instances where definition_id in (select id from def_to_delete); delete from def_runtime where definition_id in (select id from def_to_delete); delete from task_instances where id in (select id from tasks_to_delete); delete from task_definitions where id in (select id from def_to_delete); drop view if exists tasks_to_delete; drop view if exists def_to_delete; EOF " }
3. Run this function with the connector id, e.g:
reset_connector <my-connector-32-char-id-here>
DONE
Comments
0 comments
Please sign in to leave a comment.