Skip to content
Snippets Groups Projects
Commit 664d6b7c authored by Sebastian Castro's avatar Sebastian Castro
Browse files

Webhooks: automatically run webhook post crontab

parent cfe2e19f
No related branches found
No related tags found
No related merge requests found
...@@ -149,14 +149,17 @@ php bin/console doctrine:mongodb:fixtures:load ; ...@@ -149,14 +149,17 @@ php bin/console doctrine:mongodb:fixtures:load ;
chmod -R 777 var/; chmod -R 777 var/;
# TODO add crontab automatically # TODO add crontab automatically
# for Normal instance # for Normal instance
# line="@daily php $WEB_DIR/GoGoCarto/bin/console --env=prod app:elements:checkvote" # @daily php $WEB_DIR/GoGoCarto/bin/console --env=prod app:elements:checkvote
# line2="@hourly php $WEB_DIR/GoGoCarto/bin/console --env=prod app:users:sendNewsletter" # @hourly php $WEB_DIR/GoGoCarto/bin/console --env=prod app:users:sendNewsletter
# line3="@daily php $WEB_DIR/GoGoCarto/bin/console --env=prod app:elements:checkExternalSourceToUpdate" # @hourly php $WEB_DIR/GoGoCarto/bin/console --env=prod app:webhooks:post
# @daily php $WEB_DIR/GoGoCarto/bin/console --env=prod app:elements:checkExternalSourceToUpdate
# for SAAS instance # for SAAS instance
# * * * * * php $WEB_DIR/GoGoCarto/bin/console --env=prod app:main-command" # * * * * * php $WEB_DIR/GoGoCarto/bin/console --env=prod app:main-command
# @daily php $WEB_DIR/GoGoCarto/bin/console --env=prod app:saas:update-projects-info" # @daily php $WEB_DIR/GoGoCarto/bin/console --env=prod app:saas:update-projects-info
# (crontab -l; echo "$line" ) | crontab -u userhere -
# services au démarrage # services au démarrage
systemctl enable mongod systemctl enable mongod
......
...@@ -279,4 +279,13 @@ ln -nsf /etc/nginx/sites-available/${WEB_URL} /etc/nginx/sites-enabled/${WEB_URL ...@@ -279,4 +279,13 @@ ln -nsf /etc/nginx/sites-available/${WEB_URL} /etc/nginx/sites-enabled/${WEB_URL
nginx -t && service nginx restart nginx -t && service nginx restart
# TODO add crontab automatically # TODO add crontab automatically
# See install_debian.sh
# for Normal instance
# @daily php $WEB_DIR/GoGoCarto/bin/console --env=prod app:elements:checkvote
# @hourly php $WEB_DIR/GoGoCarto/bin/console --env=prod app:users:sendNewsletter
# @hourly php $WEB_DIR/GoGoCarto/bin/console --env=prod app:webhooks:post
# @daily php $WEB_DIR/GoGoCarto/bin/console --env=prod app:elements:checkExternalSourceToUpdate
# for SAAS instance
# * * * * * php $WEB_DIR/GoGoCarto/bin/console --env=prod app:main-command
# @daily php $WEB_DIR/GoGoCarto/bin/console --env=prod app:saas:update-projects-info
...@@ -24,6 +24,6 @@ class WebhooksPostCommand extends GoGoAbstractCommand ...@@ -24,6 +24,6 @@ class WebhooksPostCommand extends GoGoAbstractCommand
$numPosts = $webhookService->processPosts(5); $numPosts = $webhookService->processPosts(5);
$output->writeln('Nombre webhooks traités : ' . $numPosts); $this->log('Nombre webhooks traités : ' . $numPosts);
} }
} }
\ No newline at end of file
...@@ -20,6 +20,7 @@ class GoGoMainCommand extends ContainerAwareCommand ...@@ -20,6 +20,7 @@ class GoGoMainCommand extends ContainerAwareCommand
"app:elements:checkvote" => 24, "app:elements:checkvote" => 24,
"app:elements:checkExternalSourceToUpdate" => 24, "app:elements:checkExternalSourceToUpdate" => 24,
"app:users:sendNewsletter" => 1, "app:users:sendNewsletter" => 1,
"app:webhooks:post" => 1
]; ];
protected function configure() protected function configure()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment