Skip to content
Snippets Groups Projects
  1. Mar 13, 2025
    • Antoine R. Dumont's avatar
      runner: Update task status only after sending the tasks to rabbitmq · cbdb7c4d
      Antoine R. Dumont authored
      Prior to this, the runner called the `grab_ready{_priority}_tasks` method.
      Those method update the task's status to 'next_run_scheduled' at the listing
      time. So it actually writes immediately to postgresql.
      
      So, failing to write to rabbitmq would update the status anyway. So we change
      the runner's calls to use the `peek_ready{_priority}_tasks` methods
      instead. This now only gets the task list to schedule. And at the end of the
      runner, there is a call of `mass_schedule_task_runs` method. This method is
      now in charge to update the tasks' status to 'next_run_scheduled' within the
      same transaction.
      
      Refs. swh/infra/sysadm-environment#5512
  2. Mar 11, 2025
    • Antoine R. Dumont's avatar
      celery_backend/runner: Switch write order to rabbitmq then postgresql · 858a3709
      Antoine R. Dumont authored
      Messages are now first sent to rabbitmq then postgresql.
      
      In the nominal case where all writes are ok, that changes nothing vs the
      previous implementation (postgresql first then rabbitmq).
      
      In degraded performance though, that's supposedly better.
      
      1. If we cannot write to rabbitmq, then we won't write to postgresql either,
      that function will raise and stop.
      
      2. If we can write to rabbitmq first, then the messages will be consumed
      independently from this. And then, if we cannot write to postgresql (for some
      reason), then we just lose the information we sent the task already. This
      means the same task will be rescheduled and we'll have a go at it again. As
      those kind of tasks are supposed to be idempotent, that should not a major
      issue for their upstream.
      
      Also, those tasks are mostly listers now and they have a state management of
      their own, so that should definitely mostly noops (if the ingestion from the
      previous run went fine). Edge cases scenario like down site will behave as
      before.
      
      Refs. swh/infra/sysadm-environment#5512
    • Antoine R. Dumont's avatar
      celery_backend/runner: Extract a write to backends function · 85ee90e9
      Antoine R. Dumont authored
      To explicit its current behavior.
      
      Refs. swh/infra/sysadm-environment#5512
  3. Mar 05, 2025
  4. Feb 25, 2025
  5. Feb 17, 2025
  6. Feb 10, 2025
  7. Feb 05, 2025
  8. Dec 09, 2024
  9. Nov 29, 2024
  10. Nov 06, 2024
  11. Oct 30, 2024
  12. Oct 28, 2024
  13. Oct 24, 2024
  14. Oct 17, 2024
  15. Oct 14, 2024
    • Antoine Lambert's avatar
      cli/origin: Add schedule-high-priority-first-visits command · 4adc20b0
      Antoine Lambert authored
      This new command in the origin group enables to schedule first
      visits with high priority for origins registered by listers having
      the first_visits_priority_queue attribute set.
      
      The command ensures the visits of all origins registered by such
      listers will be scheduled with high priority after the first listing
      regardless if some have already been scheduled prior it.
      
      Subsequent executions of such listers will no longer trigger visits
      with high priority though, those will be scheduled by the recurrent
      visits runner.
      
      Related to #4687.
      4adc20b0
    • Antoine Lambert's avatar
      interface: Add get_visit_types_for_listed_origins method · 89c99a03
      Antoine Lambert authored
      It allows to return the set of visit types from the origins listed
      by a specific lister.
      
      Related to #4687.
      89c99a03
  16. Oct 09, 2024
    • Antoine Lambert's avatar
      interface: Add with_first_visits_to_schedule parameter to get_listers · 6b266002
      Antoine Lambert authored
      This new optional parameter enables to only return listers whose first
      visits of listed origins must be scheduled with high priority after a
      first listing but were not scheduled yet.
      
      Those types of listers have the first_visits_queue_prefix attribute set.
      
      Related to #4687.
      6b266002
    • Antoine Lambert's avatar
      model: Add new columns to Lister model related to priority scheduling · ccee462b
      Antoine Lambert authored
      In order to implement a new scheduler runner that will schedule first
      visits of listed origins with high priority, add the following new
      columns to the Lister model:
      
      - last_listing_finished_at: Timestamp at which the last execution of
        the lister finished
      
      - first_visits_queue_prefix: Optional prefix of message queue names
        to schedule first visits with high priority
      
      - first_visits_scheduled_at: Timestamp at which all the first visits
        of listed origins with high priority were scheduled
      
      Related to #4687.
      ccee462b
  17. Sep 10, 2024
  18. Aug 30, 2024
  19. Aug 27, 2024
  20. Jul 17, 2024
  21. Jul 16, 2024
  22. Jul 11, 2024
  23. May 23, 2024
  24. May 22, 2024
Loading