We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 74e0070 + c2d8df2 commit 8b373d9Copy full SHA for 8b373d9
1 file changed
app.py
@@ -102,7 +102,15 @@ def parse_args():
102
)
103
return parser.parse_args()
104
105
-args = parse_args()
+# Only parse arguments when running directly (not when imported by gunicorn)
106
+if __name__ == "__main__":
107
+ args = parse_args()
108
+else:
109
+ # Default args when imported by gunicorn
110
+ class DefaultArgs:
111
+ no_scrape = False
112
+ no_daily_sun = False
113
+ args = DefaultArgs()
114
115
def signal_handler(sig, frame):
116
sys.exit(0)
0 commit comments