Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Poduptime
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
noplanman
Poduptime
Commits
aee61e54
Commit
aee61e54
authored
Apr 15, 2019
by
dmorley
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'remote-pull-ease' into 'develop'
Remote pull ease See merge request
diasporg/Poduptime!238
parents
b074a132
47f116a1
Pipeline
#1462
failed with stage
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
CHANGELOG.md
CHANGELOG.md
+1
-0
db/add.php
db/add.php
+1
-0
db/update-remote-data.php
db/update-remote-data.php
+17
-1
No files found.
CHANGELOG.md
View file @
aee61e54
...
...
@@ -4,6 +4,7 @@ The format is based on [Keep a Changelog] and this project adheres to [Semantic
## [Unreleased]
### Added
### Changed
-
only check pods once a month found in the wild via crawl
-
curl function timeout can be changed from 15 second default
### Deprecated
### Removed
...
...
db/add.php
View file @
aee61e54
...
...
@@ -133,5 +133,6 @@ if (!$stop) {
echo
'Data successfully inserted! Your pod will be checked and live on the list in a few hours!'
;
}
else
{
echo
'Could not validate your pod, check your setup!<br>Take a look at your <a href="'
.
$nodeinfo_url
.
'">nodeinfo</a>'
;
updateMeta
(
'add_attempt'
,
$_domain
);
}
}
db/update-remote-data.php
View file @
aee61e54
...
...
@@ -28,6 +28,22 @@ try {
//get all existing pod domains
$existingpods
=
array_column
(
$pods
,
'domain'
);
//get pods we have not tried to auto add for a while
try
{
$sql
=
'
SELECT value
FROM meta
WHERE date_created > now() - interval \'1 month\'
AND name = \'add_attempt\'
'
;
$metaresult
=
R
::
getAll
(
$sql
);
}
catch
(
\RedBeanPHP\RedException
$e
)
{
die
(
'Error in SQL query: '
.
$e
->
getMessage
());
}
$triedpods
=
array_column
(
$metaresult
,
'value'
);
$skippods
=
array_merge
(
$existingpods
,
$triedpods
);
$foundpods
=
[];
//pulling all nodes for now
...
...
@@ -46,7 +62,7 @@ if ($pods = json_decode($diasppods['body'] ?: '', true)) {
}
}
$results
=
array_diff
(
$foundpods
,
$
existing
pods
);
$results
=
array_diff
(
$foundpods
,
$
skip
pods
);
foreach
(
$results
as
$result
)
{
echo
' domain '
.
$result
.
' trying... '
;
$add
=
__DIR__
.
'/add.php'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment