9 #define _MAINTAGENT_H 1
20 #include <sys/types.h>
42 void recurseDir(
const char* type,
char* path,
int level);
44 void deleteRepoFile(
char* sha1,
char* md5,
long fsize,
const char* type);
47 void usage(
char *name);
PGconn * pgConn
Database connection.
void exitNow(int exitVal)
Exit function. This does all cleanup and should be used instead of calling exit() or main() return.
The main FOSSology C library.
FUNCTION void removeOrphanedRows()
remove orphaned rows from fossology database
FUNCTION void verifyFilePerms(int fix)
Verify and optionally fix file permissions.
FUNCTION void deleteOldGold(char *date)
Delete gold files which are older than specified date.
FUNCTION void removeTemps()
Remove orphaned temp tables from deprecated pkgmettagetta and old delagent.
fo_dbManager * dbManager
fo_dbManager object
FUNCTION void reIndexAllTables()
reindex of all indexes in fossology database
FUNCTION void removeOldLogFiles(const char *olderThan)
FUNCTION void removeUploads()
Remove Uploads with no pfiles.
FUNCTION void removeOrphanedLogFiles()
FUNCTION void processExpired()
Process expired uploads (slow)
FUNCTION void removeExpiredTokens(long int retentionPeriod)
remove expired personal access tokens from fossology database
FUNCTION void validateFolders()
Validate folder and foldercontents tables.
FUNCTION void removeOrphanedFiles()
Remove orphaned files from the repository (slow) Loop through each file in the repository and make su...
FUNCTION void vacAnalyze()
Do database vacuum and analyze.
FUNCTION void deleteOrphanGold()
Delete orphaned gold files from the repository.
FUNCTION void normalizeUploadPriorities()
Normalize priority of Uploads.
FUNCTION void usage(char *name)
FUNCTION void checkPFileExists(char *sha1, char *md5, long fsize, const char *type)
Check if given checksums exists in DB, if not call deleteRepoFile()
FUNCTION void deleteRepoFile(char *sha1, char *md5, long fsize, const char *type)
Take a file checksum, generate repo path and call unlink()
FUNCTION void recurseDir(const char *type, char *path, int level)
Recursively read directory till level is 0.