Difference between revisions of "Truxton delete depots"

From truxwiki.com
Jump to navigation Jump to search
(Created page with "This will go through depot storage and remove any depots that have be marked ToBeDeleted. When consolidation happens, it will copy the contents...")
 
 
Line 13: Line 13:
  
 
=Return value=
 
=Return value=
Zero if the message could not be sent to the <code>maintenance</code> queue, non-zero if the message was successfully sent.
+
Zero if the [[Message Bus Messages#Delete Depots|message]] could not be sent to the <code>maintenance</code> queue, non-zero if the message was successfully sent.
  
 
=Sample=
 
=Sample=

Latest revision as of 08:33, 26 July 2022

This will go through depot storage and remove any depots that have be marked ToBeDeleted. When consolidation happens, it will copy the contents of a smaller depot to a larger one. When all of the files in the small depot have been merged into the larger depot, the record in the [Depot] table will be deleted and the depot file itself will be renamed with an extension of .ToBeDeleted

Syntax

uint32_t truxton_delete_depots( uint64_t truxton_handle );

Parameters

truxton_handle

The handle created by the truxton_create call.

Return value

Zero if the message could not be sent to the maintenance queue, non-zero if the message was successfully sent.

Sample

void cleanup_the_depot_folder( uint64_t truxton )
{
   if ( truxton_delete_depots( truxton ) != 0 )
   {
      printf( "Message sent to delete unused depots\n" );
   }
}