Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry
pleroma
Commits
8d56fb6d
Commit
8d56fb6d
authored
4 years ago
by
rinpatch
Browse files
Options
Downloads
Patches
Plain Diff
Migrate in-db config after updating to Oban 2.0
parent
5d215fd8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/configuration/cheatsheet.md
+1
-2
1 addition, 2 deletions
docs/configuration/cheatsheet.md
priv/repo/migrations/20200714081657_oban_2_0_config_changes.exs
+27
-0
27 additions, 0 deletions
...epo/migrations/20200714081657_oban_2_0_config_changes.exs
with
28 additions
and
2 deletions
docs/configuration/cheatsheet.md
+
1
−
2
View file @
8d56fb6d
...
...
@@ -629,8 +629,7 @@ Email notifications settings.
Configuration options described in
[
Oban readme
](
https://github.com/sorentwo/oban#usage
)
:
*
`repo`
- app's Ecto repo (
`Pleroma.Repo`
)
*
`verbose`
- logs verbosity
*
`prune`
- non-retryable jobs
[
pruning settings
](
https://github.com/sorentwo/oban#pruning
)
(
`:disabled`
/
`{:maxlen, value}`
/
`{:maxage, value}`
)
*
`log`
- logs verbosity
*
`queues`
- job queues (see below)
*
`crontab`
- periodic jobs, see
[
`Oban.Cron`
](
#obancron
)
...
...
This diff is collapsed.
Click to expand it.
priv/repo/migrations/20200714081657_oban_2_0_config_changes.exs
0 → 100644
+
27
−
0
View file @
8d56fb6d
defmodule
Elixir
.
Pleroma
.
Repo
.
Migrations
.
Oban20ConfigChanges
do
use
Ecto
.
Migration
import
Ecto
.
Query
alias
Pleroma
.
ConfigDB
alias
Pleroma
.
Repo
def
change
do
config_entry
=
from
(
c
in
ConfigDB
,
where:
c
.
group
==
^
":pleroma"
and
c
.
key
==
^
"Oban"
)
|>
select
([
c
],
struct
(
c
,
[
:value
,
:id
]))
|>
Repo
.
one
()
if
config_entry
do
%{
value:
value
}
=
config_entry
value
=
case
Keyword
.
fetch
(
value
,
:verbose
)
do
{
:ok
,
log
}
->
Keyword
.
put_new
(
value
,
:log
,
log
)
_
->
value
end
|>
Keyword
.
drop
([
:verbose
,
:prune
])
Ecto
.
Changeset
.
change
(
config_entry
,
%{
value:
value
})
|>
Repo
.
update
()
end
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment