Enable Fork Sync mode
Asset automation comes with the configuration option fork_sync in the censhare Admin Client. Learn how commands and the setup in fork_sync mode work. With the fork_sync mode, the main command still exists after a forked command was canceled.
Activate the mode
In the Asset Automations, there are the following options in the trigger event setting area:
The 3 modes: Sync: The sync-timeout keeps the command running. Important note: sync-timeout must be less than the session timeout. Default session timeout is set to 60 minutes. Plain: Serial. Parallel: parallel execution
Process
There is a. initial main command in a wait state. When events occur, only one instance is forked to proceed the events. The initial main command gets the state 'active'. The new forked command gets the state 'waiting for callback'. The new forked command has a timeframe (sync timeout) to do his job a. when the job was not finished within the timeframe
the forked command will be canceled
the initial main command gets a wait state
When the job is finished within the timeframe:
the forked command disappears
the initial main command gets a wait state
Example with the create preview-command
1. Starting situation: There is a 'main' preview command with command-id 'cs-srv15.20130110.104537.305' in the state 'wait event':
2. A 'create preview' event occurs: The 'main' command gets the state 'active' and forks one new command instance:
2013.01.10-10:47:02.657 FINE : T028: CommandExecutor: cs-srv15.20130110.104537.305[system]: sync fork of event command preview_maker.aa-preview started
The command ID of the new command instance is 'cs-srv15.20130110.104901.344'. It starts the preview engine and gets the state 'wait for callback':
2013.01.10-10:49:01.361 FINE : T025: AAPreview.setup: CommandExecutor: cs-srv15.20130110.104901.344[system]: taking: 2_wellaHeida 3_1.tif[11972-v1-c0-tcn6-ccn6] 2013.01.10-10:49:01.361 INFO : T025: AAPreview.setup: CommandExecutor: cs-srv15.20130110.104901.344[system]: working on: 2_wellaHeida 3_1.tif[11972-v1-c0-tcn6-ccn6]
Command ID of the preview engine it cs-srv15.20130110.104901.362 and get the state 'active'. This is one who does the real work. It removes already existing files and creates new ones:
2013.01.10-10:49:01.362 INFO : T025: AAPreview.setup: CommandExecutor: cs-srv15.20130110.104901.362[system]: preview_maker.aa-preview-engine execute … 2013.01.10-10:49:01.368 INFO : T006: AAPreviewEngine.deleteExistingPreviews: CommandExecutor: cs-srv15.20130110.104901.362[system]: Removing opi, preview and thumbnail of asset: 2_wellaHeida 3_1.tif[11972-v1-c0-tcn6-ccn6] … 2013.01.10-10:49:05.473 FINE : T037: AAPreviewEngine.processPreview: CommandExecutor: cs-srv15.20130110.104901.362[system]: processPreview() … 2013.01.10-10:49:05.709 FINE : T016: AAPreviewEngine.processThumbnail: CommandExecutor: cs-srv15.20130110.104901.362[system]: processThumbnail() … 2013.01.10-10:49:05.763 INFO : T010: CommandExecutor: cs-srv15.20130110.104901.362[system]: preview_maker.aa-preview-engine completed all in 4401ms
Command state in censhareAdmin when the command is working:
After the preview engine command was finished, the forked command will be finished afterwards:
2013.01.10-10:49:05.774 INFO : T010: CommandExecutor: cs-srv15.20130110.104901.344[system]: preview_maker.aa-preview completed all in 4432ms
At least, the main preview command will be finished and get beck into the state 'wait event':
2013.01.10-10:47:09.606 FINE : T028: CommandExecutor: cs-srv15.20130110.104537.305[system]: sync fork of event command preview_maker.aa-preview finished with state 'completed all' 2013.01.10-10:47:09.607 INFO : T028: CommandExecutor: cs-srv15.20130110.104537.305[system]: preview_maker.aa-preview completed all in 6950ms
Command state in the censhare Admin Client after the job is finished: