Skip to content

Commit 5323350

Browse files
Merge pull request #168 from ARGA-Genomes/developPatch
Develop Merge Patch
2 parents 2afade9 + 75f903d commit 5323350

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/lib/data/database.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,13 @@ def checkUpdateReady(self) -> bool:
172172
lastUpdate = self.downloadManager.getLastUpdate()
173173
return self.updateManager.isUpdateReady(lastUpdate)
174174

175-
def update(self) -> bool:
175+
def update(self, flags: list[Flag]) -> bool:
176+
for flag in [Flag.UPDATE, Flag.OUTPUT_OVERWRITE]:
177+
if flag not in flags:
178+
flags.append(flag)
179+
176180
for step in (Step.DOWNLOAD, Step.PROCESSING, Step.CONVERSION):
177-
self.create(step, (True, True), True)
181+
self.create(step, flags)
178182

179183
self.package()
180184

src/tools/update.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
parser = ArgParser(description="Run update on data source")
66
parser.add_argument("-f", "--force", action="store_true", help="Force update regardless of config")
77

8-
sources, overwrite, verbose, args = parser.parse_args()
8+
sources, flags, args = parser.parse_args()
99
kwargs = parser.namespaceKwargs(args)
1010
for source in sources:
1111
if not source.checkUpdateReady() and not args.force:
1212
logging.info(f"Data source '{source}' is not ready for update.")
1313
continue
1414

15-
source.update()
15+
source.update(flags)
1616
outputFile = source.package()

0 commit comments

Comments
 (0)