Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix & improvements #991

Closed
wants to merge 4 commits into from
Closed

bugfix & improvements #991

wants to merge 4 commits into from

Conversation

alexalouit
Copy link

add semaphore locker
add cli timeout
add db unique key

add semaphore locker
add cli timeout
add db unique key
Copy link
Collaborator

@niol niol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SOURCE_UPDATE_MAX_INTERVAL definition seems to be missing.
pgsql migration seems to be missing.

@@ -234,6 +234,47 @@ public function __construct() {
'INSERT INTO version (version) VALUES (11)'
]);
}
if (strnatcmp($version, '12') < 0) {
\F3::get('db')->exec([
// Table needs to be re-created because ALTER TABLE is rather limited.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to CREATE UNIQUE INDEX https://www.sqlite.org/lang_createtable.html#constraints

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better? 2cf87ca

fix SOURCE_UPDATE_MAX_INTERVAL
cliupdate.php Outdated
@@ -1,4 +1,5 @@
<?php
set_time_limit(300);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this time limit? We are already using a greater one in the ContentLoader.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix in 54235f8

@alexalouit
Copy link
Author

SOURCE_UPDATE_MAX_INTERVAL fix in 4726c4c

@alexalouit
Copy link
Author

query fixed in 54235f8

@jtojnar
Copy link
Member

jtojnar commented Nov 2, 2017

Regarding the locking, in #967 (comment), I actually meant the flock command as demonstrated in https://serverfault.com/questions/82857/prevent-duplicate-cron-jobs-running. Emulating it on selfoss side would mean creating cliupdate_flock.php that would allow only one instance of itself at a time.

@jtojnar
Copy link
Member

jtojnar commented Nov 2, 2017

Also it would be nice if you could split the unique constraint to a separate commit from the locking part.

@alexalouit
Copy link
Author

see #994 and #995

@alexalouit alexalouit closed this Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants