save code now: Requests are not getting updated from time to time
Some requests are systematically selected for an update without actually getting updated [1]. Even though the corresponding tasks may be done [2]
- [1] swh-web db:
Time: 91.013 ms
10:38:41 swh-web@belvedere:5432=> select * from save_origin_request where status='accepted' and (visit_date is null or visit_status is null or visit_status in ('ongoing', 'created')) and request_date >= now() - interval '30 days';
+-------+-------------------------------+------------+-------------------------------------------------------+----------+-----------------+-------------------------------+---------------------+--------------+----------+
| id | request_date | visit_type | origin_url | status | loading_task_id | visit_date | loading_task_status | visit_status | user_ids |
+-------+-------------------------------+------------+-------------------------------------------------------+----------+-----------------+-------------------------------+---------------------+--------------+----------+
| 86401 | 2021-07-17 22:43:29.870783+00 | git | https://github.com/keybase/client | accepted | 396435047 | 2021-07-17 22:43:35.725966+00 | running | created | (null) |
| 87538 | 2021-07-26 12:59:50.038714+00 | svn | https://svn.r-project.org/R-dev-web/trunk/ | accepted | 396985198 | 2021-07-26 12:59:52.299569+00 | running | created | (null) |
| 87536 | 2021-07-26 12:54:25.784339+00 | svn | svn://svn.code.sf.net/p/codeblocks/code/trunk | accepted | 396984987 | 2021-07-26 12:54:31.857131+00 | running | created | (null) |
| 87544 | 2021-07-26 13:34:16.987444+00 | git | https://android.googlesource.com/platform/system/core | accepted | 396985908 | 2021-07-26 13:34:25.182417+00 | running | created | (null) |
+-------+-------------------------------+------------+-------------------------------------------------------+----------+-----------------+-------------------------------+---------------------+--------------+----------+
(4 rows)
Time: 44.824 ms
- [2]
10:40:00 softwareheritage-scheduler@belvedere:5432=> select * from task where id in (396985198, 396435047, 396984987, 396985908);
+-----------+----------+------------------------------------------------------------------------------------------+-------------------------------+------------------+--------------------+---------+--------------+----------+
| id | type | arguments | next_run | current_interval | status | policy | retries_left | priority |
+-----------+----------+------------------------------------------------------------------------------------------+-------------------------------+------------------+--------------------+---------+--------------+----------+
| 396435047 | load-git | {"args": [], "kwargs": {"url": "https://github.com/keybase/client"}} | 2021-08-03 17:22:21.784019+00 | 64 days | next_run_scheduled | oneshot | 2 | high |
| 396984987 | load-svn | {"args": [], "kwargs": {"url": "svn://svn.code.sf.net/p/codeblocks/code/trunk"}} | 2021-08-03 19:05:09.045631+00 | 1 day | disabled | oneshot | 0 | high |
| 396985198 | load-svn | {"args": [], "kwargs": {"url": "https://svn.r-project.org/R-dev-web/trunk/"}} | 2021-08-03 16:15:35.306511+00 | 1 day | completed | oneshot | 2 | high |
| 396985908 | load-git | {"args": [], "kwargs": {"url": "https://android.googlesource.com/platform/system/core"}} | 2021-08-03 16:15:35.306511+00 | 64 days | completed | oneshot | 2 | high |
+-----------+----------+------------------------------------------------------------------------------------------+-------------------------------+------------------+--------------------+---------+--------------+----------+
(4 rows)
Time: 9.306 ms
(don't mind keybase, it's another matter
Migrated from T3458 (view on Phabricator)
Edited by Phabricator Migration user