Skip to content

Commit

Permalink
fix boto3 RecursionError
Browse files Browse the repository at this point in the history
  • Loading branch information
JoinTyang committed Jan 18, 2025
1 parent 6d51775 commit 74c92b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# -*- coding: utf-8 -*-
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'seahub.settings' # set env for repo monitor cache
from gevent import monkey; monkey.patch_all()

import logging
import argparse

Expand Down Expand Up @@ -32,7 +35,6 @@ def main(background_tasks_only=False):

os.environ['EVENTS_CONFIG_FILE'] = os.path.expanduser(args.config_file)
seafile_conf_path = os.path.join(seafile_conf_dir, 'seafile.conf')
os.environ['DJANGO_SETTINGS_MODULE'] = 'seahub.settings' # set env for repo monitor cache

seafile_config = get_config(seafile_conf_path)
config = get_config(args.config_file)
Expand Down Expand Up @@ -63,8 +65,6 @@ def main(background_tasks_only=False):
foreground_tasks_enabled = True
background_tasks_enabled = False

from gevent import monkey; monkey.patch_all()

app = App(config, seafile_config, foreground_tasks_enabled=foreground_tasks_enabled,
background_tasks_enabled=background_tasks_enabled)

Expand Down

0 comments on commit 74c92b1

Please sign in to comment.