You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Archiving a show is useful because it enables jobs to be submitted to the archived show to be executed by allocations subscribed to the show it has been alias to. For example, if a facility has a show called ABC that has wrapped, but its content might still be useful for training purposes, a show calls TRN (training) could be created with small group of hosts assigned to it and ABC could be aliased to TRN which would make jobs submitted to ABC to be picked up by hosts assigned to TRN.
Mechanism
Shows can already be aliased on the database, the current process requires going to the database and adding an entry with the aliased show to the show_alias table and renaming the existing show on the show table to append .archived.
Ideally this should be a hidden feature on the API.
The implementation involves adding a new api call to the proto layer, implementing the client call on pycue and the server logic on cuebot.
To help with the development of this feature, here's a database function that can be triggered to archive a show on demand.
CREATE OR REPLACEFUNCTIONarchive_show_to_trn(IN SHOW_STR_NAME VARCHAR)
RETURNS VOID AS $body$
BEGININSERT into show_alias (pk_show_alias, pk_show, str_name)
SELECTs.pk_show, '00000000-0000-0000-0000-000000000221', s.str_namefrom show s
wheres.str_name= SHOW_STR_NAME;
UPDATE show set str_name = CONCAT(SHOW_STR_NAME, '_archive') where str_name = SHOW_STR_NAME;
END;
$body$
LANGUAGE PLPGSQL;
-- 00000000-0000-0000-0000-000000000221 is the PK for the show to be used as the destination of the alias
The text was updated successfully, but these errors were encountered:
Ack @DiegoTavares, thanks! Will check this out. Also, could I be assigned to this?
I'll start working on it on the side and get in fully once the addon CI work is at a satisfactory level.
Will send any questions/doubts in a new mail thread.
Feature request
Add a new methods to the
show
api wrapper to allow archiving a show that has been inactive for a while.Example of the usage:
Context
Archiving a show is useful because it enables jobs to be submitted to the archived show to be executed by allocations subscribed to the show it has been alias to. For example, if a facility has a show called ABC that has wrapped, but its content might still be useful for training purposes, a show calls TRN (training) could be created with small group of hosts assigned to it and ABC could be aliased to TRN which would make jobs submitted to ABC to be picked up by hosts assigned to TRN.
Mechanism
Shows can already be aliased on the database, the current process requires going to the database and adding an entry with the aliased show to the
show_alias
table and renaming the existing show on theshow
table to append.archived
.Ideally this should be a hidden feature on the API.
The implementation involves adding a new api call to the proto layer, implementing the client call on pycue and the server logic on cuebot.
To help with the development of this feature, here's a database function that can be triggered to archive a show on demand.
The text was updated successfully, but these errors were encountered: