Removing autostart from configuration
This commit is contained in:
parent
b42701e4ef
commit
a9a55719aa
@ -33,7 +33,6 @@ type Proxy struct {
|
|||||||
|
|
||||||
// Settings - Configuration file structure
|
// Settings - Configuration file structure
|
||||||
type Settings struct {
|
type Settings struct {
|
||||||
Autostart []string `"json:autostart"`
|
|
||||||
Crawl bool `"json:crawl"`
|
Crawl bool `"json:crawl"`
|
||||||
Banned []string `"json:banned"`
|
Banned []string `"json:banned"`
|
||||||
Alwaysbot []string `"json:alwaysbot"`
|
Alwaysbot []string `"json:alwaysbot"`
|
||||||
|
@ -4,16 +4,6 @@
|
|||||||
* https://github.com/neoclide/jsonc.vim
|
* https://github.com/neoclide/jsonc.vim
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* Automatically start following the following instances's public timeline
|
|
||||||
* If an external account with the same endpoint exists, the autostart
|
|
||||||
* will use the authenticated to follow
|
|
||||||
*/
|
|
||||||
"autostart": [
|
|
||||||
"mastodon.social",
|
|
||||||
"pleroma.site"
|
|
||||||
],
|
|
||||||
|
|
||||||
// Should pollers automatically crawl
|
// Should pollers automatically crawl
|
||||||
"crawl": true,
|
"crawl": true,
|
||||||
|
|
||||||
|
@ -95,20 +95,12 @@ func main() {
|
|||||||
var endpoint string
|
var endpoint string
|
||||||
err = rows.Scan(&endpoint)
|
err = rows.Scan(&endpoint)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logErr("Unable to iterate")
|
logErr("Unable to iterate database, exiting.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_, exists := GetRunner(endpoint)
|
_, exists := GetRunner(endpoint)
|
||||||
if exists == false {
|
if exists == false {
|
||||||
go StartInstance(endpoint)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Start from Autostart list
|
|
||||||
for _, endpoint := range settings.Autostart {
|
|
||||||
logInfo("Autostarting " + endpoint)
|
logInfo("Autostarting " + endpoint)
|
||||||
_, exists := GetRunner(endpoint)
|
|
||||||
if exists == false {
|
|
||||||
go StartInstance(endpoint)
|
go StartInstance(endpoint)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user