Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9349289
03.sql
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
661 B
Subscribers
None
03.sql
View Options
-- SWH Scheduler Schema upgrade
-- from_version: 02
-- to_version: 03
-- description: Fix a bug in handling default intervals for task types
begin
;
insert
into
dbversion
(
version
,
release
,
description
)
values
(
3
,
now
(),
'Work In Progress'
);
create
or
replace
function
swh_scheduler_create_tasks_from_temp
()
returns
setof
task
language
plpgsql
as
$$
begin
return
query
insert
into
task
(
type
,
arguments
,
next_run
,
status
,
current_interval
)
select
type
,
arguments
,
next_run
,
'next_run_not_scheduled'
,
(
select
default_interval
from
task_type
tt
where
tt
.
type
=
tmp_task
.
type
)
from
tmp_task
returning
task
.
*
;
end
;
$$
;
commit
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jul 4 2025, 7:15 PM (6 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3319066
Attached To
rDSCH Scheduling utilities
Event Timeline
Log In to Comment