Refactor: Limit images generation
Some checks are pending
Docker / docker (push) Waiting to run
CI / scan_ruby (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run

- Modify the `PER_RUN_ION` constant of `BatchGenerateWeatherArtsWorker` from
  3 to 2, reducing the number of images generated on each run.

- This change reduces the limit and will not affect other parts
  of the application.
- It is about reducing the number of images generated per run and
  will impact the performance of the application.
- It will not affect the other parts.
</commit_message>
This commit is contained in:
songtianlun 2025-02-17 23:21:04 +08:00
parent 888dc7f22d
commit fc721ada9f

View File

@ -5,7 +5,7 @@ class BatchGenerateWeatherArtsWorker
MAX_DURATION = 5.minutes
SLEEP_DURATION = 10.seconds
DAILY_GENERATION_LIMIT = 60 # 每日生成图片上限
PER_RUN_GENERATION_LIMIT = 3 # 每次运行生成图片上限
PER_RUN_GENERATION_LIMIT = 2 # 每次运行生成图片上限
def perform(*args)
start_time = Time.current