Publish in Production

The Copy Process node allows you to avoid issues when the destination file exists and is in use by clients such as ProDiver and DivePort. Unfortunately, the node behavior differs for models and cBases on Windows servers due to the difference in the way that DiveLine opens these files.

The mechanics for the publish option are as follows (in cases where the destination file exists):

  1. Move the source into the destination directory, but with a random name.
  2. Rename the original destination file (add .tempinuse to the end).
  3. Move the (randomly named) new file into place.
  4. Delete the .tempinuse file.

For model files, the rename works despite the file being open, and then the delete removes the file from the directory, but does not actually delete it until all file handles to the file have been freed.

For cBases, the delete fails because DiveLine opens the file in a fundamentally different way—memory mapping vs. creating a standard file handle.

Production automatically cleans up the .tempinuse files upon the next publish—assuming they are not still open.

Site administrators need to be aware that old cBases will linger a little longer than old models. There are two options:

  • let Production clean up the files or
  • create a step to clean them up