Skip to content
This repository has been archived by the owner on Sep 11, 2021. It is now read-only.

Commit

Permalink
Fix issue with config read/write and multiprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiaswold committed Aug 3, 2020
1 parent 392f935 commit 1161f94
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import multiprocessing
import os
import sys
import time

from sources import SOURCES
from utils import config, versions
Expand Down Expand Up @@ -154,6 +155,8 @@ def main():

for source in SOURCES:
p.apply_async(source.import_item_sets)
# sleep to make sure config doesn't get accessed by more than one process at once
time.sleep(3)

# waits for all source imports to be done before continuing
p.close()
Expand Down

0 comments on commit 1161f94

Please sign in to comment.