File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 2929RETRY_WAIT_MAX = 10 # seconds
3030MAX_CONCURRENT_REQUESTS = 5 # Maximum concurrent API requests
3131SEMAPHORE_TIMEOUT = 300 # Timeout for acquiring semaphore in seconds
32+ VERBOSE = False
3233
3334dotenv .load_dotenv ()
3435
@@ -227,16 +228,18 @@ async def process_tasks(
227228
228229 # Show progress indicator
229230 progress_percent = (completed_tasks / total_tasks ) * 100
230- print (
231- f"Progress: { completed_tasks } /{ total_tasks } ({ progress_percent :.1f} %) - Completed task: { task_id } "
232- )
231+ if VERBOSE :
232+ print (
233+ f"Progress: { completed_tasks } /{ total_tasks } ({ progress_percent :.1f} %) - Completed task: { task_id } "
234+ )
233235
234236 except Exception as e :
235237 completed_tasks += 1
236238 progress_percent = (completed_tasks / total_tasks ) * 100
237- print (
238- f"Progress: { completed_tasks } /{ total_tasks } ({ progress_percent :.1f} %) - Error processing task: { e } "
239- )
239+ if VERBOSE :
240+ print (
241+ f"Progress: { completed_tasks } /{ total_tasks } ({ progress_percent :.1f} %) - Error processing task: { e } "
242+ )
240243 # Continue with other tasks instead of failing completely
241244 continue
242245
You can’t perform that action at this time.
0 commit comments