From 9d2ac4d87dc98bd2ab60da38a7e98f0964fd1595 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 18 Sep 2017 12:12:11 -0400 Subject: lock to avoid more than one export to a remote at a time This commit was sponsored by Jack Hill on Patreon. --- Annex/Locations.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Annex') diff --git a/Annex/Locations.hs b/Annex/Locations.hs index a5de2e4ff..947cceef9 100644 --- a/Annex/Locations.hs +++ b/Annex/Locations.hs @@ -37,6 +37,7 @@ module Annex.Locations ( gitAnnexFsckDbLock, gitAnnexFsckResultsLog, gitAnnexExportDbDir, + gitAnnexExportLock, gitAnnexScheduleState, gitAnnexTransferDir, gitAnnexCredsDir, @@ -300,6 +301,10 @@ gitAnnexExportDir u r = gitAnnexDir r "export" fromUUID u gitAnnexExportDbDir :: UUID -> Git.Repo -> FilePath gitAnnexExportDbDir u r = gitAnnexExportDir u r "db" +{- Lock file for export state for a special remote. -} +gitAnnexExportLock :: UUID -> Git.Repo -> FilePath +gitAnnexExportLock u r = gitAnnexExportDir u r ++ ".lck" + {- .git/annex/schedulestate is used to store information about when - scheduled jobs were last run. -} gitAnnexScheduleState :: Git.Repo -> FilePath -- cgit v1.2.3